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

Atr%

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

    Atr%

    reverse atr% not working.
    not taking input.

    is it possible to change the color of ATR when stochRSI in over bought and over sold?
    Attached Files
    Last edited by sumana.m; 11-16-2014, 07:01 AM.

    #2
    Hello sumana.m,

    Thank you for your post.

    When you refer to the ATR % not taking input, what do you mean? Are you speaking about the code you provided? Is the value not what you expect?

    You can change Plot colors using the PlotColors: http://www.ninjatrader.com/support/h...plotcolors.htm

    You can call the stochRSI method in your code with the syntax at the following link: http://www.ninjatrader.com/support/h...i_stochrsi.htm

    Comment


      #3
      Hi

      Originally posted by NinjaTrader_PatrickH View Post
      Hello sumana.m,

      Thank you for your post.

      When you refer to the ATR % not taking input, what do you mean? Are you speaking about the code you provided? Is the value not what you expect?
      Yes.Code is not setting "period" as the input taken from user end.

      You can change Plot colors using the PlotColors: http://www.ninjatrader.com/support/h...plotcolors.htm

      You can call the stochRSI method in your code with the syntax at the following link: http://www.ninjatrader.com/support/h...i_stochrsi.htm
      I shall work on this.

      (I am new to ninja coding)
      Last edited by sumana.m; 11-16-2014, 11:08 PM.

      Comment


        #4
        Hello sumana.m,

        Thank you for your response.

        Please use 'period' as this is what you set it to. For example:
        Plot0.Set(100/(ATR(period)[0]/Open[0]-Close[0]));

        Comment


          #5
          Main point on that last post of mine is that it needs to be lower-case.
          Originally posted by NinjaTrader_PatrickH View Post
          Hello sumana.m,

          Thank you for your response.

          Please use 'period' as this is what you set it to. For example:

          Comment


            #6
            The code will produce multiple division by zero errors, as you divide by

            -> (ATR(Period)[0])
            -> (Open[0] - Close[0])

            Both terms often take the value 0, already the first Doji bar will trigger an exception.

            Comment


              #7
              Originally posted by Harry View Post
              The code will produce multiple division by zero errors, as you divide by

              -> (ATR(Period)[0])
              -> (Open[0] - Close[0])

              Both terms often take the value 0, already the first Doji bar will trigger an exception.

              IMO div by zero will be handled by ninja itself ...

              attached files are here
              Attached Files
              Last edited by sumana.m; 11-24-2014, 11:04 PM.

              Comment


                #8
                Originally posted by sumana.m View Post
                IMO div by zero will be handled by ninja itself ...

                attached files are here
                Division by zero is a logic error. You have to handle it. In any case, one should never depend on any framework to handle one's errors.

                IOW, your opinion notwithstanding, NinjaTrader will not handle your errors, other than to gracefully catch them and notify you. Your code will still break. That is why you are not seeing any Plots. You can look in your iog to see what error NinjaTrader trapped for you.

                Comment


                  #9
                  SimpleATRpWithEma.zip

                  SimpleEMAATRPandEMAOFTHAT.zip

                  Click image for larger version

Name:	BANKBARODACORRECTED (Daily)  04_06_2014 - 29_11_2014.jpg
Views:	1
Size:	86.7 KB
ID:	872748


                  Hi

                  Originally posted by koganam View Post
                  Division by zero is a logic error. You have to handle it. In any case, one should never depend on any framework to handle one's errors.

                  IOW, your opinion notwithstanding, NinjaTrader will not handle your errors, other than to gracefully catch them and notify you. Your code will still break. That is why you are not seeing any Plots. You can look in your iog to see what error NinjaTrader trapped for you.
                  Here you go . Got Everything with the help of a friends so all credit goes to him.Please use anyone of them.I love the previous one
                  Attached Files
                  Last edited by sumana.m; 11-30-2014, 04:59 AM.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by chartchart, 05-19-2021, 04:14 PM
                  3 responses
                  577 views
                  1 like
                  Last Post NinjaTrader_Gaby  
                  Started by bsbisme, Yesterday, 02:08 PM
                  1 response
                  15 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by prdecast, Today, 06:07 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post prdecast  
                  Started by i019945nj, 12-14-2023, 06:41 AM
                  3 responses
                  60 views
                  0 likes
                  Last Post i019945nj  
                  Started by TraderBCL, Today, 04:38 AM
                  2 responses
                  18 views
                  0 likes
                  Last Post TraderBCL  
                  Working...
                  X