Relative Strength of True Range

Andrew Longstaff  

Hi,


I'm trying to copy an indicator from Trading View and part of the indicator has the follow line of code

rr = ta.rma(ta.tr, 35)

ta.tr =  True range.  It is max(high - low, abs(high - close[1]), abs(low - close[1]))

ta.rma =  Moving average used in RSI. It is the exponentially weighted moving average with alpha = 1 / length.


What would be the correct way to write something similar?

Navdeep Singh  
Andrew Longstaff:

Hi,


I'm trying to copy an indicator from Trading View and part of the indicator has the follow line of code

ta.tr =  True range.  It is max(high - low, abs(high - close[1]), abs(low - close[1]))

ta.rma =  Moving average used in RSI. It is the exponentially weighted moving average with alpha = 1 / length.


What would be the correct way to write something similar?

Create an iATR handle with period set to 1 and then create a iMA handle with smoothing set to SMMA and applied to iATR handle.
Andrew Longstaff  
Navdeep Singh #:
Create an iATR handle with period set to 1 and then create a iMA handle with smoothing set to SMMA and applied to iATR handle.

Thank you, Navdeep. 

I've not used handles before but I've given the documentation a read and it's exactly what I need. Thanks friend