Both strategy and indicator are setup for Calculate.OnEachTick and check the IsFirstTickOfBar to do single bar stuff.
I need to be able to detect in both indicator and strategy if I am running on historical data in order to prevent a few things form happening (mostly TTS voice notifications).
The problem is when a strategy is started on live data it is run against X amount of data prior to the current price in the market to get a base for populating the bars etc for running the strategy.
I check to verify the state is not State.Historical however when running on this "pre" data it appears the state is State.Realtime.
How can I determine that this "realtime" is not actually real time on current market price but the strategy setting itself up to start so I can avoid the unnecessary TTS voice commands etc?
Thanks.
Comment