Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access ATR within BarsType code

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

    Access ATR within BarsType code

    I'm trying to develop a custom volatility-based bar type for myself but it seems I'm unable to call the ATR indicator from a BarsType class. Is there any way I can get around this? Preferably I'd just like to call the ATR() function but if it's possible to calculate it myself with the local bars array, that would work too.

    Thanks

    #2
    Hello brohnhdon,

    Unfortunately, indicators can only be called from scripts that have an internal primary series.

    i.e. Indicators and Strategies

    This means that you would have to explicitly re-code the logic for the ATR into your custom bar type script.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by brohnhdon View Post
      I'm trying to develop a custom volatility-based bar type for myself but it seems I'm unable to call the ATR indicator from a BarsType class. Is there any way I can get around this? Preferably I'd just like to call the ATR() function but if it's possible to calculate it myself with the local bars array, that would work too.

      Thanks
      In NT7, I coded renko bar length = ATR(10). Note: somehow ninja doesn't read ATR value thru parm setting so if you want to change ATR value you have to modify the code. It should be easy to adapt it to NT8 since there is NT8 renko bar already.
      Attached Files

      Comment


        #4
        Originally posted by nkhoi View Post

        In NT7, I coded renko bar length = ATR(10). Note: somehow ninja doesn't read ATR value thru parm setting so if you want to change ATR value you have to modify the code. It should be easy to adapt it to NT8 since there is NT8 renko bar already.
        Has anybody updated this for NT8?

        Comment


          #5
          Hello mase2005, thanks for your post.

          We will be making a NinjaTrader 8 version of the BetterRenkoATR bar type as time allows. If you would like the conversion out faster a NinjaScript consultant may be hired from the NinjaTrader Ecosystem.

          Thanks in advance for your patience.
          Chris L.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Franck Z, Today, 09:49 AM
          0 responses
          4 views
          0 likes
          Last Post Franck Z  
          Started by pvtrader, Today, 08:02 AM
          2 responses
          7 views
          0 likes
          Last Post pvtrader  
          Started by Natoc, Today, 03:04 AM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by Rudy2323, Today, 02:56 AM
          2 responses
          26 views
          0 likes
          Last Post Rudy2323  
          Started by tonynt, Yesterday, 02:07 PM
          1 response
          34 views
          0 likes
          Last Post NinjaTrader_Jason  
          Working...
          X