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(MA) Progamming

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

    #16
    Originally posted by Stok View Post
    OK, here is ES H4. The bottom cyan is the daily ATR and the read line is the 14EMA. This only updates EOD, so in the data panel to the upper left the red number is ATR(14) as of yesterday. I can plot the ATR(14)SMA on top as well to see the differences if need be. Thanks for your help!
    That makes things easier.

    The histogram on your chart shows the true range of each bar. NinjaTrader only has the ATR indicator, but if you set the period to 1, you can display the true range as well. As you can see the true range of today's bar is 15.25 as indicated by both software packages.

    The red moving average is an EMA(14) of the true ranges. You can also build this indicator with NinjaTrader by simply adding an EMA(14) to your chart, but for that EMA you need to select the ATR(1) as input series. If you compare the values of the two software packages, Ensign prints 13.98, while NinjaTrader comes up with 14.00. This is a small difference and it is probably data related. The ATR is calculated from the daily close values. My data (Kinetick) provides the daily settlement price, maybe Ensign comes with a regular close or has a different settlement price for one of the last 14 business days.

    The Ensign ATR formula is not the original one suggested by Welles Wilder Jr.. It uses the smoothing factor 1/(2N + 1) instead of the smoothing factor 1/N used by Wilder. Actually you can convert the Ensign (modified) ATR to the NinjaTrader (original) ATR for odd periods. For even periods it is not possible.

    (1) Convert ATR(13) from Ensign: The smoothing constant used by Ensign is 2/(13+1) = 2/14 = 1/7. You can therefore simply apply an ATR(7) to your NinjaTrader chart.

    (2) Convert ATR(14) from Ensign: The smoothing constant used by Ensign is 2/(14+1) = 2/15 = 1/7.5. As you cannot display an ATR(7.5) with NinjaTrader, the Ensign ATR cannot be exactly converted, when an even period is used.

    But in any case, NinjaTrader allows you to add an EMA and then select the ATR(1) - true range - as input series.

    Chart attached.
    Attached Files

    Comment


      #17
      Originally posted by Harry View Post
      That makes things easier.

      The histogram on your chart shows the true range of each bar. NinjaTrader only has the ATR indicator, but if you set the period to 1, you can display the true range as well. As you can see the true range of today's bar is 15.25 as indicated by both software packages.

      The red moving average is an EMA(14) of the true ranges. You can also build this indicator with NinjaTrader by simply adding an EMA(14) to your chart, but for that EMA you need to select the ATR(1) as input series. If you compare the values of the two software packages, Ensign prints 13.98, while NinjaTrader comes up with 14.00. This is a small difference and it is probably data related. The ATR is calculated from the daily close values. My data (Kinetick) provides the daily settlement price, maybe Ensign comes with a regular close or has a different settlement price for one of the last 14 business days.

      The Ensign ATR formula is not the original one suggested by Welles Wilder Jr.. It uses the smoothing factor 1/(2N + 1) instead of the smoothing factor 1/N used by Wilder. Actually you can convert the Ensign (modified) ATR to the NinjaTrader (original) ATR for odd periods. For even periods it is not possible.

      (1) Convert ATR(13) from Ensign: The smoothing constant used by Ensign is 2/(13+1) = 2/14 = 1/7. You can therefore simply apply an ATR(7) to your NinjaTrader chart.

      (2) Convert ATR(14) from Ensign: The smoothing constant used by Ensign is 2/(14+1) = 2/15 = 1/7.5. As you cannot display an ATR(7.5) with NinjaTrader, the Ensign ATR cannot be exactly converted, when an even period is used.

      But in any case, NinjaTrader allows you to add an EMA and then select the ATR(1) - true range - as input series.

      Chart attached.
      Thanks Harry so much! Looks like it solved the issue!!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Stanfillirenfro, Today, 07:23 AM
      9 responses
      23 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by George21, Today, 10:07 AM
      0 responses
      6 views
      0 likes
      Last Post George21  
      Started by DayTradingDEMON, Today, 09:28 AM
      2 responses
      18 views
      0 likes
      Last Post DayTradingDEMON  
      Started by navyguy06, Today, 09:28 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by cmtjoancolmenero, Yesterday, 03:58 PM
      8 responses
      32 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X