Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Additional data series is lagging behind

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

    Additional data series is lagging behind

    My strategy runs on 200-tick chart.
    I added 15 sec bars data series.
    I added Swing indicator, using that bars array.

    My strategy prints all the swing highs and lows found within the lookback period in my function that checks the swing levels from the Swing indicator.
    I add Swing indicator to a separate chart using 15sec data, for comparison.

    I'm using the correct BarsInProgress:

    Code:
    if (BarsInProgress == 5 && IsFirstTickOfBar)
    {
    UpdateSwingLevels15Sec();
    }​
    From testing, it seems that the swing levels are updated 1-2 minutes late in my strategy, after they were already on the separate 15sec chart earlier.
    A swing low shows up on the separate 15sec chart, marked by Swing indicator. Then it shows up 1-2 minutes later in the list of swings from the Swing Indicator that is added to my strategy.

    Is my 15sec data series out of sync with my 200 tick (primary) data series?

    #2
    Hello iantriestrading,

    I recommend you create a new test script. Call the AddDataSeries() method call in State.Configure.
    Print the bar time in each respective BarsInProgress in OnBarUpdate().
    In real-time only, print computer time (Core.Globals.Now) when printing the bar time as well.
    This will let us know when the bars are updating.
    Save the output from the output window to a text file (right-click the output window, select Save as) and attach this to your next post.

    Below is a link to a support article on using prints to understand behavior.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you! I'm sorry but I think it actually ended up being a different problem unrelated to this. I don't think the series are in fact out of sync anymore.
      It was an issue with some of my other logic.

      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