I am trying to get Open and close values for CurrentBar. It is returning correct values but for very fourth bar it is display wrong values. This is the code i am using in my custom indicator
Cyclelengtth = 28;
open1 = Bars.GetDayBar( Cyclelength/2).Open;
close1 = Bars.GetDayBar(Cyclelength/2).Close;
open2 = Bars.GetDayBar(Cyclelength/2 - 1).Open;
close2 = Bars.GetDayBar(Cyclelength/2 - 1).Close;
i got below data in output screen.
Please let me know what i am doing wrong
Comment