As clarified by NinjaTrader_Jesse (How to structure Multi-Time Frame Strategy), a single-instrument multi-timeframe strategy must use Calculate.OnEachTick to access data from any BarsArray Bar[0] before the close of the Bar.
Where I wish to only evaluate at or near the end of the Primary DataSeries (5min), Jesse suggested using OnEachTick and IsFirstTickOfBar to identify the close, and at that point access other series to calculate indicators or do other actions.
As the Secondary DataSeries updates after the Primary DataSeries, I believe this approach would require referencing indicators based on the Primary DataSeries at Bar[1] (the just completed bar) and any Secondary DataSeries at Bar[0] (which lags the Primary DataSeries by one tick). The below snippet shows the approach I am currently contemplating. Any suggestions are welcome.
if (BarsInProgress == 0 && IsFirstTickOfBar) { // Calculate indicators on all BarsArrays }
Comment