Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator Offset

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

    Indicator Offset

    Hi,

    If I plot a SMA of a close on my chart, the indicator begins to plot 21 bars following the first bar. Clearly the SMA can begin to ploton the very first bar but does not. How does one override the BarsRequired setting for indicators provided as part of NT? Please advise. Thank you.

    #2
    Hello Zeos6,

    Thank you for your post.

    You can do this by adding BarsRequired to the Initialize() section of the indicator with the value you wish.

    You must first go to the NinjaTrader Control Center > Tools > Edit NinjaScript > Indicator > select the Indicator > Ok > when the NinjaScript Editor opens right click and select Save As > giv ethe indicator a new name > then add BarsRequired to the Initialize() section.

    For information on BarsRequired please visit the following link: http://www.ninjatrader.com/support/h...rsrequired.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      Hi Patrick,

      Thank you for your reply. I don't think you answered my question - at least I hope you didn't. I know how to use BarsRequired. The question was how to override the BarsRequired in indicators already provided as part of NT. Are you telling me that I need to go into the code provided as part of NT and add the BarsRequired statement?

      Comment


        #4
        Hello Zeos6,

        Thank you for your response.

        My original response is correct, this would be the only way to set the BarsRequired to another value other than the default.

        Please let me know if I may be of further assistance.

        Comment


          #5
          Wow. Thank you for letting me know Patrick.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          649 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          370 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          576 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X