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 popecapllc, 08-09-2023, 07:42 PM
                  9 responses
                  1,362 views
                  0 likes
                  Last Post BartMan
                  by BartMan
                   
                  Started by ETFVoyageur, 04-30-2024, 02:04 PM
                  11 responses
                  101 views
                  0 likes
                  Last Post ETFVoyageur  
                  Started by bubblegum, 03-18-2024, 10:41 AM
                  3 responses
                  46 views
                  0 likes
                  Last Post vjsworld  
                  Started by JamesK1, Today, 02:48 PM
                  1 response
                  13 views
                  0 likes
                  Last Post JamesK1
                  by JamesK1
                   
                  Started by llanqui, Today, 03:51 PM
                  0 responses
                  13 views
                  0 likes
                  Last Post llanqui
                  by llanqui
                   
                  Working...
                  X