The indicator uses Draw.TextFixed to plot the value of the currently forming bar and the range of the previous bar. It also plots a few other things but the issue is that it will not work if I try to plot the value of the previous bar. I am using a multi-line plot and when I try to utilise the 2nd line (double previous), the plot disappears completely.
The full code of the indicator is attached.
This is the code I am using and I have show the troublesome line as a comment with the // thingy in front.
protected override void OnBarUpdate()
{
if (CurrentBar < 5)
return;
double now = Math.Abs((High[0] - Low[0])/TickSize);
//double previous = Math.Abs((High[1] - Low[1])/TickSize);
double target_1 = Math.Round (((ATR(Fast)[0] / TickSize )*Tgt_1),0) ;
double target_2 = Math.Round (((ATR(Fast)[0] / TickSize )*Tgt_2),0) ;
double slow = Math.Round ((ATR(Slow)[0] / TickSize ),0) ;

Comment