Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi timeframe strategy - Structure

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Multi timeframe strategy - Structure

    NT Forum,

    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.

    Code:
    if (BarsInProgress == 0 && IsFirstTickOfBar)
    {
      // Calculate indicators on all BarsArrays
    }
    Last edited by Shansen; 01-04-2018, 02:16 AM.

    #2
    With further thought, this issue is resolved... I think.
    Thanks Jesse.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    77 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X