Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7B6 Strategy: DataSeries sync to secondary Bars is broken

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

    NT7B6 Strategy: DataSeries sync to secondary Bars is broken

    It's supposed to be possible to create a Data Series synced to Bars other than the primary bars. This works in Indicators in NT7, but it's broken in strategies.

    If you create a DataSeries synced to a different set of bars:

    syncedToBarsArray1 = new DataSeries (SMA(BarsArray[1],10));

    the DataSeries will not be synced to BarsArray[1], it will have strange behavior. If BarsArray[0] is a longer timeframe, it will sync to BarsArray[0]. If BarsArray[0] is a shorter timeframe, it appears to not sync to anything.

    How to reproduce:

    Install the attached strategy DataSeriesSyncTest. Run it on first on the instrument "SPY" set to 6 days of daily data. The strategy creates a secondary bar series of 30 minute bars, and a Data Series synced to it. In OnBarUpdate, it prints the [0] and [1] positions of each data series object.

    When you run the strategy, you will see that the [1] position of the Data Series "syncedToBarsArray1" changes only daily, in sync with the primary bars.

    Now run the strategy again, with the strategy set to use 10-minute bars as the primary. You will see that the [1] position of the Data Series "syncedToBarsArray1" never changes, and it generates an error message for indicator SMA on bar 10.

    Also, is there a way to create a new Data Series, synchronized with a secondary bar series, without invoking SMA? Not only does it seem unintuitive (I don't won't to calculate an SMA), but I tried to do it from a "user defined method" and I couldn't because the compiler wouldn't allow it.

    Another question: is there a way to create a Data Series that I can sync myself? i.e., it doesn't shift with any bar series, it shifts only when a method is called. This would be quite valuable.

    Thanks,

    Kevin
    Attached Files
    Last edited by kdoren; 01-05-2010, 01:30 PM.

    #2
    Josh will follow up next week. Thanks

    Comment


      #3
      Kevin,

      We are looking into your findings and will let you know what we find.

      As far as syncing to something that is not an indicator, unfortunately that is not possible. If you want a "DataSeries" not synced to some bars object you could try using an array.
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        The reason I want to use a DataSeries instead of an array is that with a DataSeries I can apply indicators to it; with an array I can't.

        Comment


          #5
          Unfortunately using a DataSeries requires you to have it tied to a bars object.
          Josh P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          599 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          344 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          558 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          557 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X