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 PriorDay

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

    ATR PriorDay

    Hello,

    Is there any function to know the ATR of prior day, similar to PriorDayOHLC()?

    Thanks in advance and regards.

    #2
    Hello soyjesus,

    Thanks for your post.

    You can access any value of bars ago of the ATR. Please see the helpguide here: http://ninjatrader.com/support/helpG..._range_atr.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your answer, but my question is about access to ATR from yesterday, for example, while I have a chart in minutes and get it without add a new time-frame.

      Comment


        #4
        Hello soyjesus,

        Thanks for your reply.

        To answer your original question, no there is no method like PriorDayOHLC to obtain the prior day ATR from 1 minute bars. You would need to code something up to accomplish this where you would have a set of dataseries variables where you could save the values of ATR such as ATR High, ATR Low. Through the day the ATR of the current bar can be compared and if exceeds the high or low write the new high or low to the dataseries. Not sure if you want the ATR of the opening bar but you could obtain that by saving the ATR value of that bar when FirstBarOfSession is true. Likewise you could get the previous days last ATR value also when FirsBarOfSession is true by examining the ATR()[1].
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by BarzTrading, Today, 07:25 AM
        1 response
        9 views
        1 like
        Last Post NinjaTrader_Clayton  
        Started by EB Worx, 04-04-2023, 02:34 AM
        7 responses
        161 views
        0 likes
        Last Post VFI26
        by VFI26
         
        Started by Mizzouman1, Today, 07:35 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by Radano, 06-10-2021, 01:40 AM
        20 responses
        616 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by i019945nj, 12-14-2023, 06:41 AM
        6 responses
        69 views
        0 likes
        Last Post i019945nj  
        Working...
        X