I actually made one . its kinda good visualisation tool for fast moving averages.
https://tos.mx/4Xvv2j
https://tos.mx/4Xvv2j
Ruby:
#also gannhilow
#https://www.tradingview.com/script/xzIoaIJC-SSL-channel/
declare upper;
input period=8;
input avgType=averageType.simple;
def avgHigh=movingAverage(avgType,high, period);
def avgLow=movingAverage(avgType,low, period);;
def H1v = if isnan(close[1]) then 0
else if close > avghigh then 1
else if close<avgLow then -1
else H1v[1];
plot sslDown= if h1v<0 then avghigh else avglow;
ssldown.setDefaultColor(color.red);
plot sslUp= if h1v<0 then avgLow else avghigh;
sslUP.setDefaultColor(color.green);
addcloud(sslup,ssldown,color.dark_green,color.red);
Last edited by a moderator: