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 Perr0Grande, Today, 07:09 AM
    3 responses
    28 views
    0 likes
    Last Post MiCe1999  
    Started by SheriDi, 04-25-2025, 02:24 PM
    3 responses
    49 views
    0 likes
    Last Post SheriDi
    by SheriDi
     
    Started by aligator, Today, 11:32 AM
    2 responses
    15 views
    0 likes
    Last Post aligator  
    Started by tradeologist, Today, 02:16 PM
    2 responses
    13 views
    0 likes
    Last Post tradeologist  
    Started by kawansantos, Today, 10:29 AM
    2 responses
    14 views
    0 likes
    Last Post kawansantos  
    Working...
    X