Could you please help me code for this WL on HULL to give a signal as soon as it changes from down to up or viceversa… for example “UP now” and the next bar just “up”. The code I have is the following:
input price = close;
input length = 20;
input displace = 0;
plot HMA = MovingAverage(AverageType.HULL, price, length)[-displace];
Addlabel (yes, if HMA < HMA  then “DN” else “UP”, color.BLACK);
Assignbackgroundcolor(if HMA < HMA then color.MAGENTA else color.CYAN);
Alert(HMA > HMA and HMA < HMA, “Up”, Alert.BAR, Sound.Bell);
Alert(HMA < HMA and HMA > HMA, “Down”, Alert.BAR, Sound.Bell);
Marked as spam
Where do I create this code? Did not work in Create in Watch List or Scan. Scan rejected AddLabel line.
It's not a scan. This is for a watchlist column. It will not work in a scan because it was never intended to be used as a scan. It works perfectly well in the custom watchlist column, as shown in the screenshot included with my solution.
Please log in to post questions.