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 mattbsea, Today, 05:44 PM
          0 responses
          4 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          31 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Started by tkaboris, Today, 05:13 PM
          0 responses
          2 views
          0 likes
          Last Post tkaboris  
          Started by GussJ, 03-04-2020, 03:11 PM
          16 responses
          3,282 views
          0 likes
          Last Post Leafcutter  
          Started by WHICKED, Today, 12:45 PM
          2 responses
          20 views
          0 likes
          Last Post WHICKED
          by WHICKED
           
          Working...
          X