NexusFi: Find Your Edge


Home Menu

 





Fibonacci Retracement - Plot


Discussion in Platforms and Indicators

Updated
    1. trending_up 4,230 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 2 attachments




 
Search this Thread

Fibonacci Retracement - Plot

  #1 (permalink)
Feazy
Zug, Switzerland
 
Posts: 4 since Jul 2020
Thanks Given: 0
Thanks Received: 0

hi,

I am looking to Plot the following Fibonacci Retracement Levels:
100%
76.4%
23.6%
0%

I would like to have a "history" of the retracements, therefore, I adopted the following Code from ABCTradingGroup Lesson 5:

 
Code
Variables: 
Fib0 ( Low ), 
Fib236 ( ( ( High - Low ) * 0.236 + Low ) ) ,
Fib764 ( ( ( High - Low ) * 0.764 + Low ) ) , 
Fib100 ( High ) ; 

// reset on a date change
if Date <> Date[1] then 
begin 
	//reset the Fibonaaci Retracements to the first bar
	Fib0 = Low ; 
	Fib236 = ( ( High - Low ) * 0.236 + Low ) ; 
	Fib764 = ( ( High - Low ) * 0.764 + Low ) ;
	Fib100 = High ; 
end ; 

// update Fibonacci 0% Retracement
if Low < Fib0 then Fib0 = Low ;

 // update Fibonacci 100% Retracement
if High > Fib100 then Fib100 = High ;

// update Fibonacci 23.6% Retracement
if ( ( Fib100 - Fib0 ) * 0.236 + Fib0 ) < Fib236 then Fib236 = ( ( Fib100 - Fib0 ) * 0.236 + Fib0 ) ;

// update Fibonacci 76.4% Retracement
if ( ( Fib100 - Fib0 ) * 0.764 + Fib0 ) > Fib764 then Fib764 = ( ( Fib100 - Fib0 ) * 0.764 + Fib0 ) ;

// plot Fibonacci Retracements on the chart
Plot4 ( Fib100, "100%", Red ) ; 
Plot3 ( Fib764, "76.4%", Darkgray ) ;
Plot2 ( Fib236, "23.6%", Darkgray ) ; 
Plot1 ( Fib0, "0%", Red ) ;
The High and Low Retracements work well, however, I am having trouble with the 76.4% and 23.6% levels. If you look at the images attached to this thread, you can see that either one of these middle retracements are not fully correct. For example, on image 1, the 76.4% line is matching with another Fibonacci Indicator I am using but the 23.6% is not correct. On image 2 you can derive that using a different Underlying the opposite results.

I really need some help finding out what I am coding wrong, appreciate any help!

thanks a lot,

F

Attached Thumbnails
Click image for larger version

Name:	Image 1.png
Views:	243
Size:	119.0 KB
ID:	303396   Click image for larger version

Name:	Image 2.png
Views:	219
Size:	65.5 KB
ID:	303397  
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
What broker to use for trading palladium futures
Commodities
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #2 (permalink)
 
jupikseliga's Avatar
 jupikseliga 
Europe-Ireland
 
Experience: Intermediate
Platform: NT8
Broker: NT
Trading: ES, NQ, CL
Posts: 175 since Feb 2012
Thanks Given: 114
Thanks Received: 92

.

Hard work make me rich
Reply With Quote
  #3 (permalink)
Feazy
Zug, Switzerland
 
Posts: 4 since Jul 2020
Thanks Given: 0
Thanks Received: 0


Okkeeyyy..... very helpful

Reply With Quote
  #4 (permalink)
 
jupikseliga's Avatar
 jupikseliga 
Europe-Ireland
 
Experience: Intermediate
Platform: NT8
Broker: NT
Trading: ES, NQ, CL
Posts: 175 since Feb 2012
Thanks Given: 114
Thanks Received: 92


Feazy View Post
Okkeeyyy..... very helpful

Hi,

I did reply but for NT platform. U r using other platform so I tried delete my original post, but I dont know how. So I changed text to "." Anyway, I had same problem and I asked NT development team to add this feature.

https://forum.ninjatrader.com/forum/ninjatrader-8/platform-technical-support-aa/1080215-fibonacci-shadow

Hard work make me rich
Reply With Quote




Last Updated on July 26, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts