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

      I really have a hard time figuring out how to use Filters in my Strategy which have different time frames than my primary indicators. For example, I want to trade using 5 min price bars indicators, but only during those days when 10 DAY moving average > 50 DAY moving average (Filter). Hence, my trouble is setting up Filters using DayPeriods while other indicators should have MinutePeriods. Any ides? Thanx Jere :welcome: Have you looked at the other examples found by using the search feature? 40543 How …




      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.

        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by adeelshahzad, Today, 03:54 AM
        5 responses
        32 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by stafe, 04-15-2024, 08:34 PM
        7 responses
        32 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by merzo, 06-25-2023, 02:19 AM
        10 responses
        823 views
        1 like
        Last Post NinjaTrader_ChristopherJ  
        Started by frankthearm, Today, 09:08 AM
        5 responses
        21 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        43 views
        0 likes
        Last Post jeronymite  
        Working...
        X