Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Minimum Bars for Indicator Calculation

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

    Minimum Bars for Indicator Calculation

    Hi,

    Whenever I add an indicator to a Chart it only diplays it calculated in chart starting from bar 20. However, SMA of period lenght 3 should already exist since bar 2 (0,1,2). Is it being calculated but only displayed from bar 20 on or is there something I have to change in code to do it and display it ? I've already checked the native script for SMA indicator, but I couldn't find where the limitation for 21 bars minimum is...

    Thanks

    #2
    Hello agenor,

    Thanks for your post.

    What you are looking for is called "BarsRequired" which relates to the (display) plotting but not of the indicator calculation period. The BarsRequired default is 20. Here is a link to the help guide that discusses BarsRequired. http://www.ninjatrader.com/support/h...rsrequired.htm

    Please let me know if you have any further questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sjsj2732, 03-23-2026, 04:31 AM
    0 responses
    76 views
    0 likes
    Last Post sjsj2732  
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    313 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    311 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    149 views
    1 like
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    111 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Working...
    X