Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsInProgress - when/how to use?

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

    BarsInProgress - when/how to use?

    For my current strategy I am loading up to 3 different time frames using addDataSeries(), and I believe I understand what BarsInProgress does from a functional point of view, but try as I might I'm really missing the use-case(s)/context(s) in which BarsInProgress should/can be used, and why one would do so (I found the documentation at https://ninjatrader.com/support/help...nstruments.htm to be over-simplistic to the point that it wasn't helpful to me).

    Another way to approach the same basic question(s) might be, what reasons are there for not just processing any/all multi-time frame logic without any specific BarsInProgress callouts? Would it be efficiency reasons? Synchronization issues? Something else, I'm overlooking?

    Thank you

    #2
    Hello Calebg,

    BarsInProgress lets you know which series is processing in OnBarUpdate.

    If you want to trigger an action when the primary bar is closing you can add a condition that BarsInProgress is 0.

    If you want to place an order to a secondary instrument you can place the order using BarsInProgress 1.

    Below is a public link to a reference sample that demonstrates adding a secondary series.


    As well as a public link to the help guide.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Just what I need, thanks!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      662 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      376 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X