Need help with AFL

#1
Hi everybody,

Please help me in coding this AFL:-

Buy when price crosses EMA50 on upward side
Sell when price crosses EMA50 on downward side

This much I have already done (too simple, isn't it :))

Now comes the tricky part:
I need to know when the price of a scrip comes within, say 3%, of the EMA50 on either side. If possible using sound and pop alert for the buy/sell condition and price coming within range.

Thanks in Advance.
 

Similar threads