EMA Slope by Jose Silva for Amibroker (AFL)
panno over 15 years ago Amibroker (AFL)
The indicator “EMA slope by Jose Silva” is very useful to confirm trend and movement
Screenshots
Indicator / Formula
Copy & Paste Friendly
// Jose Silva's code ported on 28th April 2010 8:36 pm by xyte@inditraders
pds = Param("EMA Periods", 21, 1, 2520, 1);
Period= ParamList("Use as Input","Open|High|Low|Close|Volume",1);
if(Period=="Open"){x=Open;}
if(Period=="High"){x=High;}
if(Period=="Low"){x=Low;}
if(Period=="Close"){x=Close;}
if(Period=="Volume"){x=Volume;}
//Indicator
EMAx=EMA(x,pds);
//Slope
EMAprev=Ref(EMAx,-1);
y=Min(EMAx,EMAprev)/Max(EMAx,EMAprev);
EMAratio=(IIf(EMAx>EMAprev,2-y,y)-1)*100;
EMAper=IIf(EMAratio < 0, atan2(EMAratio,1)-360, atan2(EMAratio,1))*10/9; //This is where the problem lies
Signalx=EMA(EMAper,pds);
//Plots
Plot(Signalx, "Signal", colorGreen, styleLine|styleThick);
Plot(EMAper, "EMAper", colorRed, styleLine|styleThick);
2 comments
Leave Comment
Please login here to leave a comment.
I have seen a lot of indicators by Jose Silva for Metastock.
Amazing Indicator…Just try its slope