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 CarlTrading, Yesterday, 09:41 PM
      1 response
      15 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, Today, 02:41 AM
      0 responses
      6 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, Yesterday, 11:44 PM
      0 responses
      13 views
      0 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      32 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      31 views
      0 likes
      Last Post CarlTrading  
      Working...
      X