Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MultiSeries Indicators - Lag

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

    MultiSeries Indicators - Lag

    When adding a second bar series to an indicator the first bar series (BarsInProgress == 0) is executed prior to the second bar series, in case that the bar's time stamps are identical.

    Usually the second bar series however is used to process data, which then is used by the primary bar series. So it would makes sense to reverse the order of bar processing:

    - first process the secondary bars
    - then process the primary bars, which use the information generated by the secondary bars

    I have coded a very simple indicator, which adds a 1-minute bar series to a primary bar series. The problem is that bar processing in this order causes a lag of 1 bar, which can be easily demonstrated on a 1 min chart.

    Is there a workaround to reverse the order of bar processing?
    Attached Files

    #2
    Hello,

    There is no workaround in code. You would only be able to manually change this by starting the strategy on the data series your currently using as the secondary series and reversing it this way.

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Thanks for your answer Brett.

      It was my limited understanding of how the OnBarUpdate() process works. I thought about it again and have found a simple solution. I just need to set the DataSeries values in the end. So there is no problem at all. Guess, I had to write down the question to find the answer.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      596 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      343 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
      556 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      554 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X