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 pibrew, Today, 06:37 AM
          0 responses
          0 views
          0 likes
          Last Post pibrew
          by pibrew
           
          Started by rbeckmann05, Yesterday, 06:48 PM
          1 response
          12 views
          0 likes
          Last Post bltdavid  
          Started by llanqui, Today, 03:53 AM
          0 responses
          6 views
          0 likes
          Last Post llanqui
          by llanqui
           
          Started by burtoninlondon, Today, 12:38 AM
          0 responses
          10 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          15 views
          0 likes
          Last Post AaronKoRn  
          Working...
          X