Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple question about BarsInProgress != 0

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

    Simple question about BarsInProgress != 0

    If you had a strategy that works only with the original price data series as Close[0], Close[1]...etc, is it really necessary this statement generated by the Strategy Builder?

    Code:
    if (BarsInProgress != 0)
                    return;​


    Obviously, this means: discarding any update different than the original data series 0.

    Thanks


    #2
    Hello pstrusi,

    Thanks for your post.

    This line of code is automatically generated by the Strategy Builder when creating a Strategy Builder strategy.

    This section of code is preventing OnBarUpdate() from running in other series in case additional secondary data series are added to the Strategy Builder strategy.​

    If you are unlocking the script from the Strategy Builder to manually program your script then you could remove this section of code from the strategy.

    BarsInProgress: https://ninjatrader.com/support/help...inprogress.htm
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ETFVoyageur, Today, 04:00 PM
    2 responses
    11 views
    0 likes
    Last Post ETFVoyageur  
    Started by dward123, 01-02-2024, 09:59 PM
    3 responses
    162 views
    0 likes
    Last Post bjunaid
    by bjunaid
     
    Started by AaronKTradingForum, Today, 03:44 PM
    1 response
    8 views
    0 likes
    Last Post AaronKTradingForum  
    Started by Felix Reichert, 04-26-2024, 02:12 PM
    11 responses
    77 views
    0 likes
    Last Post Felix Reichert  
    Started by junkone, 04-28-2024, 02:19 PM
    7 responses
    83 views
    1 like
    Last Post junkone
    by junkone
     
    Working...
    X