Mechanical Trading system for Amibroker (AFL)
sandhu348 about 16 years ago Amibroker (AFL)
this AFL is based on mechanical trading , and thus removes the fear and greed.
it can be used for EOD as well IEOD live charts . and believe me results are amazing.
Enjoy !
Indicator / Formula
Copy & Paste Friendly
Plot (C,"Price",colorLime,styleBar);
Plot (MA(C,24),"ma 24",colorRed,1);
Plot (MA(C,2),"ma 24",colorYellow,1);
rawrng=HHV(C,50)-LLV(C,50);//calculate the difference betwen highest and lowest clsoe vlaues in the last 50 bars
rngup=(MA(C,24)+rawrng*0.05); // 5% of the rawrange taken as the vicinity band
rngdown=(MA(C,24)-rawrng*0.05);
k1=MA(C,24);
k2=rngup;
K3=rngdown;
j1= Close > MA( Close, 24 ) AND Open > MA( Close, 24 ) AND Open < rngup ;
j2= Close < MA( Close, 24 ) AND Close > rngdown AND Open < MA( Close, 24) ;
PlotShapes( shapeSmallCircle* j1,colorYellow, 0,H, 10);
PlotShapes( shapeSmallCircle* j2,colorBlue, 0,L, -10);
PlotOHLC(k1,k1,k2,k2,"",colorGrey40, styleCloud);
PlotOHLC(k1,k1,k3,k3,"",colorGrey40, styleCloud);4 comments
Leave Comment
Please login here to leave a comment.
Looks nice, gr8 work… what r the parameter for buy and sell?
Best way is to read the code. But the gist of it is that it checks that the price is within a percent range of the moving average.
Excellent work ! amazing indicator
It looks very nice. But How can we project buy-Sell ?? closed above band is buy and closed below is sell ?? Or we follow red aversge? Pls guide me.