Hi Doc,
You may need this code in AFL. This is in accordance with what Savant has said. It's for use with the automatic analyser of AMI to search for stocks which has started to reverse their trend after piercing bands on either sides. I've kept a filter of Avg Trading volumes over past 5 days being greater than 2.5L to filter out illiquid stocks. If you want to remove the filter, just remove the bold portions of the code below.
AFL code:
--------------------------------------------------------------------------
mean = Param("Mean",9,0,100,1);
std_devn = Param("Standard Deviation", 2,0,5,1);
Avg_vol = (Ref(Volume,-4)+ Ref(Volume,-3)+ Ref(Volume,-2)+ Ref(Volume,-1)+ Volume)/5;
Buy = Ref(Low,-1)<Ref(BBandBot(Close,mean,std_devn),-1) AND Low>BBandBot(Close,mean,std_devn) AND Avg_vol >250000 AND Close > Open;
Sell = Ref(High,-1)>Ref(BBandTop(Close,mean,std_devn),-1) AND High>BBandTop(Close,mean,std_devn) AND Avg_vol >250000 AND Close < Open;
--------------------------------------------------------------------------
Thanks and regards
djsinha
You may need this code in AFL. This is in accordance with what Savant has said. It's for use with the automatic analyser of AMI to search for stocks which has started to reverse their trend after piercing bands on either sides. I've kept a filter of Avg Trading volumes over past 5 days being greater than 2.5L to filter out illiquid stocks. If you want to remove the filter, just remove the bold portions of the code below.
AFL code:
--------------------------------------------------------------------------
mean = Param("Mean",9,0,100,1);
std_devn = Param("Standard Deviation", 2,0,5,1);
Avg_vol = (Ref(Volume,-4)+ Ref(Volume,-3)+ Ref(Volume,-2)+ Ref(Volume,-1)+ Volume)/5;
Buy = Ref(Low,-1)<Ref(BBandBot(Close,mean,std_devn),-1) AND Low>BBandBot(Close,mean,std_devn) AND Avg_vol >250000 AND Close > Open;
Sell = Ref(High,-1)>Ref(BBandTop(Close,mean,std_devn),-1) AND High>BBandTop(Close,mean,std_devn) AND Avg_vol >250000 AND Close < Open;
--------------------------------------------------------------------------
Thanks and regards
djsinha
http://www.traderji.com/amibroker/27489-help-need-afl-savantjis-system.html
I kindly request You to participate in mentioned thread to help building .afl, I have couple of questions for You. Thanks.
Hi DjSinha,
Wow.... Thanks A Ton,
Did You See That Doc, You Didn't Even Have To Request And You Already Have The Code, Given By Djsinha
This Is What I Love About This Forum......People Jump In Immediately, No Wonder.....Why This Place Feels Like Home & An Extended Family.
Thanks Once Again Djsinha
Happy & Safer Trading
SavantGarde
PS: Can Anybody Help Doc, With The SMA Part Of This, Thanks
Wow.... Thanks A Ton,
Did You See That Doc, You Didn't Even Have To Request And You Already Have The Code, Given By Djsinha
This Is What I Love About This Forum......People Jump In Immediately, No Wonder.....Why This Place Feels Like Home & An Extended Family.
Thanks Once Again Djsinha
Happy & Safer Trading
SavantGarde
PS: Can Anybody Help Doc, With The SMA Part Of This, Thanks
I kindly request you to keep eye on mentioned thread.
Thanks a Lot...