I am trying to build a custom indicator, one that appears to be similar to an ADL indicator. I say ADL because the A-D Line sums the current MF Value with the preceding A-D Line to get the current A-D Line.
My indicator, call it the ABC Line, does the following:
(Close[0] - Close[1]) * 10000 = Net
((Net - ABC Line[1]) *0.5) + ABC Line[1] = Current ABC Line
The Variables code for ADL is: AD.Set((CurrentBar == 0 ? 0 : AD[1]) + (High[0] != Low[0] ? (((Close[0] - Low[0]) - (High[0] - Close[0])) / (High[0] - Low[0])) * Volume[0] : 0));
Thus wouldn't my ABC code be:
ABC.Set((CurrentBar == 0 ? 0 : ABC[1]) + (High[0] != Low[0] ? ((((Close[0] - Close[1]) * 10000) - ABC[1]) * 0.5): 0));
Currently if I add this to a chart there are no values appearing.
Please advise on how to fix, thank you

Comment