Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot Daily ATR Values on Intraday TimeFrames

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

    Plot Daily ATR Values on Intraday TimeFrames

    Hello

    I am trying to create an indicator that will Add the Daily ATR to the Low of the current day's Range and Subtract the Daily ATR from the High of the Current Day's range. I also want to plot a percentage of that ATR.

    I have tried to see what I can do using the Wizard but it appears that I am not really able to create this with that tool.

    Could you help point me in the right direction of where to start?

    Thank you very much!

    #2
    Hello,

    This should be pretty straightforward to accomplish. You can access the current ATR via the ATR() indicator method, and you can find the current day's high and low via the CurrentDayOHL() indicator method. You can set your plot to a percentage of the ATR by calling the plot's Set() method within OnBarUpdate(). For more information on these methods, please see the links below:

    ATR(): http://www.ninjatrader.com/support/h..._range_atr.htm

    CurrentDayOHL(): http://www.ninjatrader.com/support/h...nt_day_ohl.htm

    Please let me know if I can assist further.
    Dave I.NinjaTrader Product Management

    Comment


      #3
      Originally posted by jg123 View Post
      Hello

      I am trying to create an indicator that will Add the Daily ATR to the Low of the current day's Range and Subtract the Daily ATR from the High of the Current Day's range. I also want to plot a percentage of that ATR.

      I have tried to see what I can do using the Wizard but it appears that I am not really able to create this with that tool.

      Could you help point me in the right direction of where to start?

      Thank you very much!

      You could also have a look at the anaCurrentDayOHLV43, which is part of the SessionPivots package that is available here:



      It plots the average daily range (not true range) for the last 10 days, 20 days and the current day. You can display both the range of the RTH session or the full session. This indicator does not load daily data, but scans through intraday data for the highs and lows.

      Also the average daily range is used to build target bands by adding the average range to the current day's low and by subtracting it from the current day's high. Attached is a sample chart for FDAX, which shows the average daily range for the Xetra session and further uses that range to calculate target bands for the current day.

      Xetra range last 10 days: 109 points
      Xetra range last 20 days: 119.5 point
      today's range (4:22 PM): 92 points

      The lower band shows the downside target for today's range expansion. The upside target is above the edge of the screen,

      The indicator comes open source, so you can modify it as needed.
      Attached Files

      Comment


        #4
        how to plot a atr value for the last 7 days, I just want to plot the the last 7 dyas avg ATR on the left bottom or top of the chart. I dont want to use a market analizer or plat lines, just the value.

        Comment


          #5
          Hello eddiekellertri,

          You can use Draw.TextFixed to place text on the chart. The value you calculate could be used as the text.



          Please let me know if I may be of further assistance.

          Comment


            #6
            Jesse,
            does that number will be updated every time the AVG changes or I have to manually update that ? I looking for something that calculates and plot as I don't want to have market analyzer open

            Comment


              #7
              Hello eddiekellertri,

              Thank you for your reply.

              Jesse is currently out of the office but I'm glad to assist.

              You would need to calculate the value you wish to have shown on the chart, then simply call Draw.TextFixed using the same tag name each time so it updates the value.

              Here is an example indicator that plots 3 SMAs based on different time frames and then draws their current bar values to the chart. The values printed are updated as the SMA values change.

              Please let us know if we may be of further assistance to you.
              Attached Files

              Comment


                #8
                Kate,

                Can you clarify how I add this. I have imported to my NT. Is there instructions on how to do that ? How do I link the results to this

                Comment


                  #9
                  Hello eddiekellertri,

                  What Kate had provided was an Indicator. You can find that in the Indicator list from a chart. You can also open it using the NinjaScript editor to see its code.


                  Please let me know if I may be of further assistance.


                  Comment


                    #10
                    I add the indicator but it doesn't do anything ????

                    Comment


                      #11
                      Hello eddiekellertri,

                      The sample should show text on the Bottom Right of the chart with SMA values. If you are not seeing the text please ensure you have 1 second data for the instrument being used and that you have loaded at least a few days of data to allow the SMA indicators to calculate before being used by the primary series.

                      If you are still having problems please check the Control center -> Log tab to see if any errors are being reported.

                      Please let me know if I may be of further assistance.

                      Comment


                        #12
                        Thanks for the input. I noticed that the ATR value is extracted from the ETH bar type. How to change it into RTH bar type? Thanks.

                        Comment


                          #13
                          Hello,

                          There are no ETH/RTH bar types. ETH and RTH are trading hours.

                          You can either make sure the trading hours on the primary data series is set to RTH from the Data Series window.

                          Or, you could add a data series via AddDataSeries() and specify a trading hours template. Then supply that data series to the ATR.

                          Comment


                            #14
                            Originally posted by Harry View Post


                            You could also have a look at the anaCurrentDayOHLV43, which is part of the SessionPivots package that is available here:



                            It plots the average daily range (not true range) for the last 10 days, 20 days and the current day. You can display both the range of the RTH session or the full session. This indicator does not load daily data, but scans through intraday data for the highs and lows.

                            Also the average daily range is used to build target bands by adding the average range to the current day's low and by subtracting it from the current day's high. Attached is a sample chart for FDAX, which shows the average daily range for the Xetra session and further uses that range to calculate target bands for the current day.

                            Xetra range last 10 days: 109 points
                            Xetra range last 20 days: 119.5 point
                            today's range (4:22 PM): 92 points

                            The lower band shows the downside target for today's range expansion. The upside target is above the edge of the screen,

                            The indicator comes open source, so you can modify it as needed.
                            I know were digging into the archives for this one but im looking for lines to be printed for daily ATR levels and it seems like Harry had it. Do you still have the code?

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                            0 responses
                            547 views
                            0 likes
                            Last Post Geovanny Suaza  
                            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                            0 responses
                            323 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by Mindset, 02-09-2026, 11:44 AM
                            0 responses
                            99 views
                            0 likes
                            Last Post Mindset
                            by Mindset
                             
                            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                            0 responses
                            543 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by RFrosty, 01-28-2026, 06:49 PM
                            0 responses
                            545 views
                            1 like
                            Last Post RFrosty
                            by RFrosty
                             
                            Working...
                            X