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

Calculating a 20 period EMA of the average true range

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

    Calculating a 20 period EMA of the average true range

    So I want to add a 20 period EMA of the ATR to my current chart setup (aka computing the value of N as given in the attached image.

    ive already set the input series settings to "20". in this scenario, what is the period setting doing for the EMA here <as the period set in the timeseries? (also set to 20 in the attached.) is this correct?


    #2
    Hello Conall,

    Thank you for the post.

    In the images you provided, one period is the period of the ATR and one is the period of the EMA. It looks like you have set both to 20,

    You can find information about the ATR's period here: https://ninjatrader.com/support/help...age+true+range

    In the other image you provided, it says to use a 20-day ema. 20 would be the correct period if you are using daily bars based on the formula details you provided.

    When configuring the indicators as shown are you seeing a discrepancy?


    I look forward to being of further assistance.

    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks Jesse, just second guessing myself, wanted to make sure This is correct before I sink a chunk of time into further studies. Thanks.

      Comment


        #4
        Hello Conall,

        Thanks for confirming.

        Yes, in this case, I would suggest to just double check that the result you see is what you are expecting. It looks like you copied a formula image from "somewhere" so potentially they also have an example of the intended result. From the details I can see in the image, it seems they are using daily bars so really all I can suggest here would be to use Daily bars based on the given information.

        The value for the EMA you noted seems correct based on the image, however, the ATR I am unsure on the period you need there. In the image, they seem to be calculating the ATR on a daily basis where NinjaTraders ATR uses a Period so this may be a difference to review. In the situation that this needs a single day ATR, you may try to instead use a 1 period for the ATR.



        Please let me know if i may be of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          I am interested in doing the same thing as Connall. When I put both the ATR in and the ATR(EMA) on my chart it has the same information. Does the ATR already have more weighting to the closer candles?

          The link provided about the ATR on Ninja Trader does talk about it like it is in an EMA in one part but in a different part it says that it just calls it a moving average.

          So, is the ATR on NinjaTrader an EMA of the ATR?

          Comment


            #6
            Hello MA_commodities,

            So, is the ATR on NinjaTrader an EMA of the ATR?
            The ATR and EMA indicators don't reference each other or share common logic, the calculation the ATR uses is the Wilder format which you can read about in the investopedia link in the help guide document for ATR.



            Are you certain that you applied the ATR indicator to the chart? That should have a different output than an EMA. If you are using the builder please make sure you are not passing an input series other than Close/Default input to the ATR.

            The EMA is an average of whatever has been input to it, that could be a price or indicator value. The ATR uses specifically price data to create a true range, that's essentially High minus Low however it is more complex than just that.



            JesseNinjaTrader Customer Service

            Comment


              #7
              Thank you for the help Jesse!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by inanazsocial, Today, 01:15 AM
              0 responses
              2 views
              0 likes
              Last Post inanazsocial  
              Started by trilliantrader, 04-18-2024, 08:16 AM
              5 responses
              22 views
              0 likes
              Last Post trilliantrader  
              Started by Davidtowleii, Today, 12:15 AM
              0 responses
              3 views
              0 likes
              Last Post Davidtowleii  
              Started by guillembm, Yesterday, 11:25 AM
              2 responses
              9 views
              0 likes
              Last Post guillembm  
              Started by junkone, 04-21-2024, 07:17 AM
              9 responses
              71 views
              0 likes
              Last Post jeronymite  
              Working...
              X