need help in creating AFL


Well-Known Member
i need help in creating AFL for stock alert with pop-up window.

conditions: 13 EMA is above 34 EMA, 55 EMA is above 144 EMA and
RSI & Stochastic is below 20 and headed upwards.......
then to give buy alert with pop-up window.


13 EMA is Below 34 EMA,55 EMA is Below 144 EMA, RSI & Stochastic is above 80 and
Headed Downward
then to give sell alert with pop-up window.

cause, i am getting buy/sell signal with symbol with another afls. so if get symbols with this alert it is not possible to identify which one is from which.that's why i am asking pop-up window.

thank you in advance.
U have not specifically given the values for RSI and Stoch. U have also not mentioned abt Stoch crossing over the signal line.

Actually u can write simple stmts like this

and Ema(c,55) > ema(c,144)
and RSI(14)<20
and Stoch(15)<20;

and Ema(c,55) < ema(c,144)
and RSI(14)>80
and StochK(15)>80;


I dont have idea abt Pop-up window and Rising/Falling RSI. So i have omitted those in the above code.

But if u have many indicators on the chart and u want to have a different Buy/Sell symbol for the above code then, change the "shapeUpArrow" in the below code:-


U can change to any of these as given below:-

shapeNone, shapeUpArrow, shapeDownArrow, shapeHollowUpArrow, shapeHollowDownArrow, shapeSmallUpTriangle, shapeSmallDownTriangle, shapeHollowSmallUpTriangle, shapeHollowSmallDownTriangle, shapeUpTriangle, shapeDownTriangle, shapeHollowUpTriangle, shapeHollowDownTriangle, shapeSmallSquare, shapeHollowSmallSquare, shapeSquare, shapeHollowSquare, shapeSmallCircle, shapeHollowSmallCircle, shapeCircle,

Hope this helps

And plz be specific whenever u raise a query again

Happy trading


Similar threads