Hull Moving Average Scan?

C

Charlielee

New member
VIP
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,
 
H

HighBredCloud

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

Code:
#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
 
C

Charlielee

New member
VIP
That's the one not working. It's telling me "Invalid statement: plot at 14.1"
 
H

HighBredCloud

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

Charlielee

New member
VIP
That's not really getting it either. I'd like to insert a screenshot but I can't figure out how to do that either
 
Last edited:
C

Charlielee

New member
VIP
Thanks for the help @HighBredCloud … sometimes I think I'm dumber than I think I am
 
C

Charlielee

New member
VIP
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.
 
H

HighBredCloud

Well-known member
VIP
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

Top