Wilson Sentiment Index for Amibroker (AFL)
Xswingtrader about 16 years ago Amibroker (AFL)
Translated from Metastock code from the book “The Next Step to Trading Success” by Leon Wilson.
By Xswingtrader at xswingtrader@gmail.com
Screenshots
Indicator / Formula
Copy & Paste Friendly
MaxVol=2*EMA(V,50);
Adjustment=V-(V-MaxVol);
Value=IIf(V>MaxVol,Adjustment,IIf(V<MaxVol,V,V));
Up=IIf(C>Ref(C,-1),(C-Ref(C,-1))*Value,(C-Ref(C,-1))*Value);
Down=IIf(C<Ref(C,-1),(Ref(C,-1)-C)*Value,(Ref(C,-1)-C)*Value);
S=EMA(Sum(up,21)-Sum(down,21),3);
Plot( S, "Sentiment Index", ParamColor( "SI Color", colorBlue), ParamStyle("SI Style", styleHistogram | styleThick));
Plot(0,"",ParamColor("ZeroColor", colorRed),styleLine);
0 comments
Leave Comment
Please login here to leave a comment.