I want to make sure I understand the correct processing of historical & real-time Level 1 tick data (Datetime, Price, Volume, Bid/Ask Prices at time of trade).
The main use cases I'm interested in:
a. Historical back-fill of charts, indicators and SuperDOM columns for trading setups
b. Real-time updating of charts, indicators and SuperDOM columns while trading
c. Accessing more data than is currently displayed within either a chart range or the DOM price ladder
d. Using Tick Replay
As far as I understand, there are 3 approaches:
1. A multi-series approach:
- using AddDataSeries(xxx,BarsPeriodType.Tick) within OnStateChange() and State == State.Configure
- using GetClose(), GetVolume(), GetBid() and GetAsk() in OnBarUpdate() with Calculate == Calculate.OnEachTick in State == State.SetDefaults
- there could be is a synchronising problem with backfill as historical data is stored as separate data series for Last/Bid/Ask
- this synchronisation problem maybe overcome if historical L1 tick data is available/loaded from your data provider
- dependent on how much historical L1 tick has either been downloaded or is available from your data provider
2. Tick Replay approach (uses Market Replay data)
- with the Tick Replay option set, accessing Last,Volume, Bid/Ask Price data within OnMarketData() for MarketDataType.LastMarketDataType.Last
- there is no synchronisation problem with this approach
- this approach handles be more CPU intensive as higher-level bars would also be build from tick data
- dependent on how much Market Replay has been downloaded
3. Using BarsRequest
- creating a BarsRequest for a desired start/end datetime and a BarsPeriodType.Tick
- using OnBarUpdate() and BarsUpdateEventArgs to process real-time updates
- using OnRender() to display data (in either a chart or a SuperDOM column)
- dependent on how much historical L1 tick has either been downloaded or is available from your data provider
My questions:
1. Is my understanding in general correct? Or have I missed something?
2. If historical L1 tick data is available from your data provider (I'm using Continuum), will the L1 tick data always be provided & processed correctly ie synchronised ?
3. Are there any further requirements to make sure this works correctly - eg within the various OnStateChange() states?
4. When using BarsRequest, where should you perform an initial load of data ? I'm thinking State.Configure...
Many thanks.
Comment