I am working on trying to change some code from requiring TickReplay in order to backtest to not requiring it. My requirement for Tick Replay comes in when I try to compare today's current range on daily bars while submitting orders on a tick bar data series. The logic of OnBarClose combined with an added daily bar series made me think I needed Tick Replay and Calculate.OnEachTick for this to work. The reason is because the OnBarClose logic makes YESTERDAY'S index number [0], whereas the OnEachTick logic allows for today's daily bar index to be [0].
However, I wanted to ask if it is possible to use the following script to access today's range while using Calculate.OnBarClose:
if (Highs[-1] - Lows[-1] > ATR1[0]) { /do something }
Will a -1 index while using Calculate.OnBarClose access today's data?
Comment