When creating an indicator which loads historical data, I've noticed that at least 21 bars need to be loaded before OnBarUpdate is triggered. (I am setting the 'Last Date' and then adjusting 'Bars back'.) Unless the latter is a number 21 or greater, it appears that OnBarUpdate is not processed. This can be verified by including a print statement within OnBarUpdate and watching the output in the window. The phenomenon persists whether the data is daily or weekly or I change my 'Last Date'.
Is this a bug, a feature (some limit set somewhere?) or am I missing something here? When I am ready to trade live, does this mean I will have to wait at least 21 bars into the trading period before my indicator becomes active?
I am using the free version of NT 6.0.1000.7.
many thanks for the help
and happy new year!
Comment