Today is Monday, Jan 17th, 2022 (market closed today, MLK day)
I have data up to Friday, Jan 14th. For example, AAPL, the closing price on Jan 14th was 173.07.
I am using daily bar data. I get my data through a paid Kinetic account.
However, if I run this code through today Jan 17
protected override void OnBarUpdate() { Print(Time[0].ToLongDateString()); }
Thursday, January 6, 2022
Friday, January 7, 2022
Monday, January 10, 2022
Tuesday, January 11, 2022
Wednesday, January 12, 2022
Thursday, January 13, 2022
I have tried using Calculate.OnEachTick or Calculate.OnPriceChange but neither one is helping.
I have written a strategy to calculate some price data values and indicator reading of the last day of the backtest's trading, but it keeps calculating the day before the last day of the backtest only.
How can I get the measurement of price and its indicators on the last bar of a strategy backtest?
Comment