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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    89 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X