♥ 0 |
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 [1] then “DN” else “UP”, color.BLACK); Assignbackgroundcolor(if HMA < HMA[1] then color.MAGENTA else color.CYAN); #Alert Alert(HMA > HMA[1] and HMA[1] < HMA[2], “Up”, Alert.BAR, Sound.Bell); Alert(HMA < HMA[1] and HMA[1] > HMA[2], “Down”, Alert.BAR, Sound.Bell);
Marked as spam
|
Please log in to post questions.