Notifications
Clear all

Relative Moving Average

Mike
 Mike
(@vanguardai)
Co-Founder Admin

A smoother moving average with less whipsaws during trends.

//Relative Moving Average
set sma = sma(close,30)
set sma2 = sma(close,60)
set sma3 = sma(close,90)
set reqsma = sma2 != 0 and sma3 != 0
set issma= sma3 - sma2 + sma
set RelativeMA = if(reqsma,issma,sma)

plot(relativema,line,yellow,main)

This topic was modified 3 months ago by Mike
Quote
Topic starter Posted : 12/09/2021 2:02 pm
Share: