Andrew Longstaff:
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.
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?
Never any reason to use the SMMA(L) it's equivalent to the EMA(2L-1).
The Smoothed Moving Average or SMMA - How to Avoid It - NinjaTrader Programming | futures.io (2019)

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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?