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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      45 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      21 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      31 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X