Triangle breakout for Amibroker (AFL)
tbn2004 about 9 years ago Amibroker (AFL)
To detect stocks which finishing consolidation by dimming swings off
Indicator / Formula
Copy & Paste Friendly
/*
//Giao giao dong 60 phien truoc ko qua 15%
Max60 = HHV(Ref(C,-1),60);
Min60 = LLV(Ref(C,-1),60);
DK0 = Max60<1.15*Min60;
*/
//Giao giao dong 40 phien truoc ko qua 10%
Max40 = HHV(Ref(C,-1),40);
Min40 = LLV(Ref(C,-1),40);
DK1 = Max40<1.1*Min40;
//Giao giao dong 20 phien truoc ko qua 7%
Max20 = HHV(Ref(C,-1),20);
Min20 = LLV(Ref(C,-1),20);
DK2 = Max20<1.07*Min20;
//Giao giao dong 5 phien truoc ko qua 3%
Max5 = HHV(Ref(C,-1),5);
Min5 = LLV(Ref(C,-1),5);
DK3 = Max5<1.03*Min5;
//Phien gan nhat tang gia 2%
Tyletang = (C-Ref(C,-1))/Ref(C,-1);
DK4 = Tyletang >=0.02;
Gianhonhat = (C+Ref(C,-1)+Ref(C,-2)+Ref(C,-3)+Ref(C,-4)+Ref(C,-5))/6;
DK5 = Gianhonhat >=3;
Buy = DK1 AND DK2 AND DK3 AND DK4;1 comments
Leave Comment
Please login here to leave a comment.
Can you please add code for plotting
tks a lot