Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7 clarification - Multi timeframe strategy

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

    NT7 clarification - Multi timeframe strategy

    All,

    In NT6.5 a multi-timeframe strategy required each of the timeframes to be set as a dataseries and synced to the primary dataseries before applying any strategy criteria (as roughly detailed below). Are the same syncing requirements present in NT7? Alternatively, does the NT7 CurrentBar internal points being updated earlier do away with all the syncing requirements, and thus pretty much all of the code below.

    A worked example may be a simple way to clearly explain.

    As always, thanks
    Shannon

    BTW, top job on NT7 from what I've seen thus far.


    Code:
    #region Variables
      private DataSeries primarySeries;
      private DataSeries secondarySeries;  
    #endregion
    
    protected override void Initialize()
    {
      primarySeries = new DataSeries(this);
      Add("^SP500",PeriodType.Minute,5);
    }
    
    protected override void OnBarUpdate()
    {
      // Sync another DataSeries object to the secondary bar object
      if (secondarySeries == null)
      {  
        secondarySeries = new DataSeries(SMA(BarsArray[1],10));
      }
      if (BarsInProgress == 0)
      .... [I]Strategy Criteria[/I]

    #2
    Shannon, correct this should not be needed anymore as the pointers are updated earlier as per our code breaking changes doc which contents specific to this topic are also discussed here - http://www.ninjatrader-support2.com/...ad.php?t=27727

    Code:
    CurrentBar internal pointers are now updated earlier. This ensures that accessing bars across multiple series will be in sync regardless of which BarsInProgress context you may be working out of.
    o For historical, pointers for all bar series with the same timestamp will be updated before OnBarUpdate() will be triggered.
    o For real-time, pointers for all bar series of the same instrument will be updated before OnBarUpdate() will be triggered.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 05-06-2023, 09:03 PM
    9 responses
    258 views
    0 likes
    Last Post ender_wiggum  
    Started by Mizzouman1, Today, 07:35 AM
    4 responses
    18 views
    0 likes
    Last Post Mizzouman1  
    Started by philmg, Today, 01:17 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Started by cre8able, Today, 01:01 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by manitshah915, Today, 12:59 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Erick  
    Working...
    X