TradingView
PineCodersTASC
Apr 14, 2022 4:23 PM

TASC 2022.05 Relative Strength Exponential Moving Average 

S&P 500SP

描述

█ OVERVIEW

TASC's May 2022 edition Traders' Tips includes the "Relative Strength Moving Averages" article authored by Vitali Apirine. This is the code implementing the Relative Strength Exponential Moving Average (​RS EMA) indicator introduced in this publication.


█ CONCEPTS

​RS EMA is an adaptive trend-following indicator with reduced lag characteristics. By design, this was made possible by harnessing the relative strength of price. It operates in a similar fashion to a traditional EMA, but it has an improved response to price fluctuations. In a trading strategy, ​RS EMA can be used in conjunction with an EMA of the same length to identify the overall trend (see the preview chart). Alternatively, ​RS EMAs with different lengths can define turning points and filter price movements.

​RS EMA is an adaptive trend-following indicator with reduced lag characteristics. By design, this was made possible by harnessing the relative strength of price. It operates in a similar fashion to a traditional EMA, but it has an improved response to price fluctuations.

█ CALCULATIONS

The following steps are used in the calculation process:
• Calculate the relative strength (​RS) of a given length.
• Multiply ​RS by a chosen coefficient (multiplier) to adapt the EMA filtering the original time series. Calculate the EMA of the resulting time series.
The author recommends ​RS EMA(10,10,10) as typical settings, where the first parameter is the EMA length, the second parameter is the ​RS length, and the third parameter is the ​RS multiplier. Other values may be substituted depending on your trading style and goals.
评论
AtomOfScent
Looks interesting, thanks.
I've never seen an indicator where the values of the input variables are defined within the function.
If the function is called with the variables in the indicator settings which override those defined in the function what purpose do they serve?
davewantsmoore
@AtomOfScent, It allows you to call with function with none, or only some, of the variables. The ones omitted will have the default used.

eg. rsema() is equivalent to rsema(close, 50, 50, 10) and rsema(open, multiplier=5) is equivalent to rsema(open, 50, 50, 5)
AtomOfScent
@davewantsmoore, thanks, that's really helpful to know. I'll definitely use that tip. :)
nanujogi
@davewantsmoore, thanks for enlightening never knew that.
更多