Relative Moving Ave...
 
Notifications
Clear all

Relative Moving Average

1 Posts
1 Users
0 Likes
1,001 Views
Mike
 Mike
(@vanguardai)
Posts: 70
Co-Founder Admin
Topic starter
 

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 2 years ago by Mike
 
Posted : 12/09/2021 2:02 pm
Share: