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 thomaswilleford, Today, 12:07 AM
          0 responses
          3 views
          0 likes
          Last Post thomaswilleford  
          Started by dlygorivw, Yesterday, 10:55 PM
          0 responses
          2 views
          0 likes
          Last Post dlygorivw  
          Started by dlygorivw, Yesterday, 10:53 PM
          0 responses
          4 views
          0 likes
          Last Post dlygorivw  
          Started by janiyaconnelly, Yesterday, 10:41 PM
          0 responses
          3 views
          0 likes
          Last Post janiyaconnelly  
          Started by slimoriginus, Yesterday, 10:07 PM
          0 responses
          5 views
          0 likes
          Last Post slimoriginus  
          Working...
          X