♥ 0 |
Hi guys, Anyone able to help for this.. Am trying to create a script that will plot the yearly Fibonacci levels on your chart no matter what timeframe you are on.. input price = close; def agg = AggregationPeriod.DAY; def a = HighestAll(YearHigh); def upward = highnumberall > lownumberall; def x = AbsValue(lownumberall – highnumberall ); def slope = (a – b) / x; def day = GetDay(); def line = b + (slope * (barnumber – lownumber)); def currentlinelow = if barnumber <= lownumberall then linelow else Double.NaN; plot FibFan = if downward then currentlinelow else if upward then currentline else Double.NaN; def range = a – b; plot Retracement0 = if downward and !onExpansion and !Extend_to_left and barnumber >= highnumberall and barnumber <= istodaybarnumber then HighestAll((b + (range * Coefficient0))) else if upward and !Extend_to_left and !onExpansion and barnumber >= lownumberall and barnumber <= istodaybarnumber then HighestAll(a – (range * Coefficient0)) else if downward and onExpansion and !Extend_to_left and barnumber >= highnumberall then HighestAll((b + (range * Coefficient0))) else if upward and onExpansion and barnumber >= lownumberall and !Extend_to_left then HighestAll(a – (range * Coefficient0)) else if downward and !onExpansion and Extend_to_left and barnumber <= istodaybarnumber then HighestAll((b + (range * Coefficient0))) else if upward and Extend_to_left and !onExpansion and barnumber <= istodaybarnumber then HighestAll(a – (range * Coefficient0)) else if downward and onExpansion and Extend_to_left then HighestAll((b + (range * Coefficient0))) else if upward and onExpansion and Extend_to_left then HighestAll(a – (range * Coefficient0)) else Double.NaN; Retracement0.HideBubble(); I WAS NOT ABLE TO POST FULL CODE HERE SI ATTACHING A TEXT FILE WITH FULL CODE Sorry a newbie in coding..
Marked as spam
|
Private answer
The solution to this is likely far beyond the scope of the free assistance we provide here in the Q&A forum. My general rule of thumb is that if I don’t have a solution in 15 minutes, the request is beyond that scope. Judging from the number of lines of code this may take hours to unravel. If interested, you are welcome to submit this as a custom project request. You can view our rates and other details here: https://www.hahn-tech.com/about/
Marked as spam
|
Please log in to post questions.