I would like to know how can i retrieve all historical data in backtesting, such as Time[i] and Close[i], for example.
I'm backtesting my strategy on a 1-day time frame from 2019/01/01 to today.
When the backtest starts, on 2019/01/02 I just get the Time[0] and Close[0].
The next day (2019/01/03) I get Time[0],Time[1] and Close[0], Close[1].
The next day (2019/01/04) I get Time[0],Time[1],Time[2] and Close[0], Close[1], Close[2] and so on.
How can I retrieve all historical Time and Close bars in the first day of backtesting?
For example, i want to retrieve 100 days before the current day. How can i do that ?
Thanks!
Comment