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 kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      58 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      41 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      46 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      37 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      156 views
      0 likes
      Last Post SalmaTrader  
      Working...
      X