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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X