I have converted the Hull Suite to scan for a bullish signal, i.e., the band turns green from red. I am not sure if I am getting the correct data or not. Can someone verify the script to see if this is acceptable or not?
Thanks
# Basic Hull Ma Pack tinkered by InSilico
# Original Port from
https://www.tradingview.com/script/hg92pFwS-Hull-Suite
input modeSwitch = {default "Hma", "Thma", "Ehma"}; #Hull Variation
input length = 15; #Length(180-200 for floating S/R , 55 for swing entry)
input src = close; #Source
def hma;
switch (modeSwitch) {
case "Hma":
hma = wma(2 * wma(src, length / 2) - wma(src, length), round(sqrt(length)));
case "Ehma":
hma = expAverage(2 * expAverage(src, length / 2) - expAverage(src, length), round(sqrt(length)));
case "Thma":
hma = wma(wma(src,(length/2) / 3) * 3 - wma(src, (length/2) / 2) - wma(src, (length/2)), (length/2));
}
def hull = hma;
def transition = hull > hull[2];
# Delete (#) the plot not needed
plot scanBull = !transition[1] and transition;
#plot scanBear = transition[1] and !transition;
# End Basic Hull Ma Pack Scan