I am using below code to get open and close values for i days ago bar. But due to some reason it is returning only close values
open1 = PriorDayOHLC().PriorOpen[i];
close1 = PriorDayOHLC().PriorClose[i];
open2 = PriorDayOHLC().PriorOpen[i + 1];
close2 = PriorDayOHLC().PriorClose[i + 1];
But sometimes it is working perfectly. But most times it is returning wrong values. Can you please let me know what i am doing wrong
open1 30.11
close1 30.11
open2 31.97
close2 31.97
Comment