There was a study somewhere which said that exponential hull ma is best. Here is EHMA for TOS, converted from tradingview.
https://tos.mx/Z7psKFb
p.s. Dont see anything special about it. yet Another MA.
Code:
#skynetgen
#exponential hull ma. from #https://www.tradingview.com/script/FOcqi6Ud-Exponential-Hull-Moving-Average-EHMA/
declare upper;
input length =13;
input price = close;
script ehma{
input price=close; input length=13;
#HMA = WMA(2*WMA(n/2) − WMA(n)),sqrt(n))
#EHMA = EMA(2*EMA(n/2) − EMA(n)),sqrt(n))
plot ehma =
expaverage((2 * expaverage(price, length / 2))-expaverage(price, length / 2),
round(sqrt(length)));
};
plot MVA =ehma(price,length);
MVA.DefineColor( "up", Color.UPTICK );
MVA.DefineColor( "dn", Color.DOWNTICK );
MVA.DefineColor( "def", Color.PLUM );
MVA.AssignValueColor(
if MVA > MVA[1] then MVA.Color( "up" )
else if MVA < MVA[1] then MVA.Color( "dn" )
else MVA.Color( "def" ) );
https://tos.mx/Z7psKFb
p.s. Dont see anything special about it. yet Another MA.
Last edited by a moderator: