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

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.
          JesseNinjaTrader Customer Service

          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
              Kate W.NinjaTrader Customer Service

              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.


                  JesseNinjaTrader Customer Service

                  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.

                      JesseNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by AnnBarnes, Today, 12:17 PM
                      0 responses
                      1 view
                      0 likes
                      Last Post AnnBarnes  
                      Started by Lopat, 03-05-2023, 01:19 PM
                      4 responses
                      166 views
                      0 likes
                      Last Post Sam2515
                      by Sam2515
                       
                      Started by f.saeidi, Today, 12:14 PM
                      0 responses
                      2 views
                      0 likes
                      Last Post f.saeidi  
                      Started by giulyko00, Today, 12:03 PM
                      0 responses
                      4 views
                      0 likes
                      Last Post giulyko00  
                      Started by AttiM, 02-14-2024, 05:20 PM
                      12 responses
                      213 views
                      0 likes
                      Last Post DrakeiJosh  
                      Working...
                      X