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 Mindset, Today, 06:46 AM
      0 responses
      8 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, Yesterday, 05:21 PM
      0 responses
      12 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      14 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      81 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      47 views
      0 likes
      Last Post PaulMohn  
      Working...
      X