drphilgood1358
New member
Can anyone help me turn either one of the plots at the bottom into an alert that I can send through text. Every time I build it out I get no alerts when triggered on the chart.
Code:
input price = close;
input length = 125;
input displace = 6;
plot HMA = MovingAverage (AverageType. HULL, price,length) [-displace];
HMA. DefineColor ("Up", GetColor (1)) ;
HMA. DefineColor ("Down", GetColor (0)) ;
HMA. AssignValueColor (if HMA > HMA[1] then HMA.color ("Up") else HMA.color ("Down") ) ;
def a = hma > hma [1];
def b = hma < hma [1];
plot up = if a and la[1] then high else double.nan;
plot down = if b and !b [1] then high else double.nan;