Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsInProgress

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

    BarsInProgress

    Hi, i'm trying to understand what barsinprogress command does.

    so if i add
    Code:
    if (BarsInProgress  == 1)
                {
                // Condition set 1
                if ((Position.MarketPosition == MarketPosition.Flat)
                    && ......................))
                {
                    EnterLongLimit(DefaultQuantity, ......., "");
                }
    vs
    without the barsinprogress; what is the difference if cobc=true

    will it wait until 1 bar has passed after my exit and then analyze the logic to reenter the market or something? sorry if this is a super basic question. i have it in one of my strategy and it does exactly what i want it to do... but i just dont understand logically what this command does..

    #2
    Originally posted by calhawk01 View Post
    Hi, i'm trying to understand what barsinprogress command does.

    so if i add
    Code:
    if (BarsInProgress  == 1)
                {
                // Condition set 1
                if ((Position.MarketPosition == MarketPosition.Flat)
                    && ......................))
                {
                    EnterLongLimit(DefaultQuantity, ......., "");
                }
    vs
    without the barsinprogress; what is the difference if cobc=true

    will it wait until 1 bar has passed after my exit and then analyze the logic to reenter the market or something? sorry if this is a super basic question. i have it in one of my strategy and it does exactly what i want it to do... but i just dont understand logically what this command does..
    FYI- my entry orders with or without are the same

    Comment


      #3
      BarsInProgress is for multiseries.

      If you don't understand NT documentation, try else where





      Originally posted by calhawk01 View Post
      Hi, i'm trying to understand what barsinprogress command does.

      so if i add
      Code:
      if (BarsInProgress  == 1)
                  {
                  // Condition set 1
                  if ((Position.MarketPosition == MarketPosition.Flat)
                      && ......................))
                  {
                      EnterLongLimit(DefaultQuantity, ......., "");
                  }
      vs
      without the barsinprogress; what is the difference if cobc=true

      will it wait until 1 bar has passed after my exit and then analyze the logic to reenter the market or something? sorry if this is a super basic question. i have it in one of my strategy and it does exactly what i want it to do... but i just dont understand logically what this command does..

      Comment


        #4
        The OnBarUpdate() is generally called for all your series including the added ones, with BarsInProgress you can filter for which series is calling the method to update.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        574 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        333 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X