I have a strategy that uses Calculate.OnEachTick and Order Flow VWAP using VWAPResolution.Tick added inside the strategy. The strategy works well with the indicator when using Realtime data feed from IB, but the VWAP indicator breaks during historical processing (no session resets occur) since IB doesn't have historical tick data. Because the strategy uses VWAP for certain calculations, it is important that the VWAP bands reset at the beginning of each session and not where Historical transitions to Realtime. In the screen shots below, the one that has no historical tick data doesn't see the session breaks but the one with tick data resets correctly at the end of every session.
I have tested that the Order Flow VWAP indicator correctly resets on the session breaks with Calculate.OnBarClose and Standard resolution for historical non-tick feeds, however this isn't the setting I want for the strategy.
I'd like to know if there is a way to use Order Flow VWAP so it shows the session breaks properly when using historical non-tick data and then transition to using tick data when entering Realtime mode so the strategy can have the granularity it needs.
I have also attached some bare-bones code I have been using for testing this issue.
NT8 Version 8.0.24.1 - 64bit
Screenshots show:
Tick Replay = Disabled
Trading Hours = US Equitues ETH
Datafeed has no tick data (IB)
Screenshot #1 has OFVwap resolution = Tick and Strategy set to Calculate.OnEachTick
Screenshot #2 has OFVwap resolution = Standard and Strategy set to Calculate.OnBarClose
Any insights you have would be great. Thanks!
Comment