Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Indicator period

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

    Indicator period

    Hello. I set 100 periods in indicator parameter. Why it show me the value of it from the first bars? How can I set it to show vakue only when n periods will be reached?

    #2
    Hello alexstox,
    Thanks for writing in and I am happy to assist you.

    You can use the below code in the Initialize section of the indicator
    Code:
    BarsRequuired = 100;
    or you can use the below code just below the OnBarUpdate section of the code
    Code:
    if (CurrentBar < 100) return;
    This will make sure you have the plots only after the 100th bar.

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      So, I can't do this without coding just in ParameterWindow of indicator?
      By default indicator calculate average value of periods before MyPeriods?

      Comment


        #4
        Hello alexstox,
        Unfortunately you cannot do it via the indicator parameters dialog. You have to custom code/modify the indicator. I will however forward your feature request to development for future consideration.

        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Hello alexstox,
          Development has assigned tracker id #1715 for your feature request. However please note, in such case NinjaTrader will not calculate an average initializing in the indicator values.

          Please let me know if I can assist you any further.
          JoydeepNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by benmarkal, Today, 12:52 PM
          0 responses
          0 views
          0 likes
          Last Post benmarkal  
          Started by stafe, 04-15-2024, 08:34 PM
          11 responses
          57 views
          0 likes
          Last Post stafe
          by stafe
           
          Started by pechtri, 06-22-2023, 02:31 AM
          5 responses
          116 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by Tim-c, Today, 03:54 AM
          3 responses
          13 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by FAQtrader, Today, 12:00 PM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X