Afl code help

#1
Just was wondering if someone could help me on the following scan criteria.

I want the price let`s say 10% above or whatever % above the 200EMA and vice versa whatever % bellow the 200EMA.

Thank you in advance !
 

mahesh2007

Active Member
#2
The criteria u want shall result in clutter.

In rising market there shall be ample buy signals and in falling market too many sell signals.

any way,

percent=Param("percent",10,1,100,1,0);//this allows u choose increment percent


Buy=Close>((100+percent)/100)*EMA(Close,200);//where close is 10% above 200 EMA
Sell=Close<( (100-percent)/100)*EMA(Close,200);//where close is 10% bellow 200 EMA