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
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    63 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    40 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    21 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    23 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    51 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X