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 cmtjoancolmenero, Yesterday, 03:58 PM
        10 responses
        36 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by DayTradingDEMON, Today, 09:28 AM
        4 responses
        24 views
        0 likes
        Last Post DayTradingDEMON  
        Started by geddyisodin, Yesterday, 05:20 AM
        9 responses
        50 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by George21, Today, 10:07 AM
        1 response
        15 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Started by Stanfillirenfro, Today, 07:23 AM
        9 responses
        24 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X