• Get $30 off VIP with code SUMMER30. Ends July 27. Happy trading!

Hull Moving Average Scan?


New member
I haven't been able to find a scan for the turning point of the HullMA. I know it's color coded on desktop when it turns to bullish, does anyone have a scan to share that detects the bullish move on it? I found the one that has been posted here https://usethinkscript.com/threads/hull-ma-scanner.1842/ but the plot line doesn't work. I still don't think that one is going to look for the bullish turning point for the indicator

thanks in advance,


Well-known member
Have more proficient coders verify this...but this should be it...

#Hull Moving Average
#Colors and arrows and labels by EBTrader 02.22.15

input price = high;
input length = 20;
input displace = 0;

def HMA = MovingAverage(AverageType.HULL, price, length)[-displace];
def uptrend = HMA > HMA;
def downtrend = HMA < HMA;

plot bullish = (HMA[1] < hma) and (HMA > hma)
#plot bearish = (HMA[1] > hma) and (HMA < hma)

#================end arrows and labels


Well-known member
That's the one not working. It's telling me "Invalid statement: plot at 14.1"
try this one
# 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


New member
Last edited by a moderator:


Well-known member
So the highlighted areas are where the Hull turns colors from bearish to bullish and vice versa. I'm looking to scan for that turn in momentum.
I thought that's what the scanner was doing? Its hard to say because from my understanding there is a delay in TOS from the time the actual HULL MA change happens to when the scanner picks it up...I thought there was a 2-3 candle delay per each timeframe...There are ways to code the scanner to show the results in real time utilizing "resultschanged" command...I just don't know how that would apply to this particular scan...Perhaps someone else more versed in scanners and coding can further assist.

Similar threads