Coding Help... Adding alert from price to indicator

#1
hello, can anybody help to add alert for my indicator

prds = Param( "Standard Line Periods", 13, 5, 26, 1 );
turn = Param( "Turning Line Periods", 3, 3, 10, 1 );
delay = Param( "Delayed Line Periods", 12, 4, 25, 1 );
span = Param( "Spans Periods", 16, 10, 52, 1 );

TL = ( HHV( H, turn ) + LLV( L, turn ) ) / 2;
SL = ( HHV( H, prds ) + LLV( L, prds ) ) / 2;
DL = Ref( C, delay );
Sp1 = ( SL + TL ) / 2;
Sp2 = ( HHV( H, span ) + LLV( L, span ) ) / 2;

_N( Title = StrFormat( "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " + WriteVal( V, 1.0 ) + " {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );

Plot( SL, "SL", colorRed, styleThick | styleNoLabel );
color = IIf( Sp1 > Sp2, ParamColor( "Span1 Color", ColorRGB( 0, 255, 0 ) ), ParamColor( "Span2 Color", ColorRGB( 255, 104, 32 ) ) );
PlotOHLC ( Sp1, Sp1, Sp2, Sp2, "Cloud", Color, styleCloud | styleNoLabel, Null, Null, delay, -2 );

buy if price cross up cloud
sell if price cross down cloud

thank you, please help
 

Similar threads