Heikin Ashi pattern scan for Amibroker (AFL)
jlgrover over 15 years ago Amibroker (AFL)
Scan for HA turn around. I like to find stocks that have had several down days (10 or more) and are followed by a few up day (2 or more).
Indicator / Formula
Copy & Paste Friendly
//-- heikin ashi
// set following params as desired
min_price=5;
up_days=2;
Down_days=10;
//
HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.3 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
barcolor = IIf(HaClose >= HaOpen,colorGreen,colorRed);
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "", barcolor, styleCandle );
Buy = IIf(IIf(barcolor == colorGreen AND C>=min_price AND
BarsSince(barcolor==colorRed)<=up_days AND HaLow==HaOpen AND
BarsSince(Ref(barcolor, -BarsSince(barcolor==colorRed)-1)==colorGreen)>=down_days,1,0),1,0);0 comments
Leave Comment
Please login here to leave a comment.