AFL for Cup and Handle Pattern
AFL script for Automatic deduction of Cup and Handle Pattern.
Script:
GiaLonNhat7to15 = HHV (Ref (C, -7), 8);
GiaLonNhat15 =HHV (Ref (C, -1), 15);
DK1 = GiaLonNhat7to15 >= GiaLonNhat15;
DK2 = C > GiaLonNhat7to15;
KhoiLuongLonNhat15 = HHV (Ref (V, -1), 15);
DK3 = V > KhoiLuongLonNhat15;
GiaBeNhat15 = LLV (Ref (C, -1), 15);
DK4 = (GiaBeNhat15 <= C*0.95) AND (GiaBeNhat15 >= C*0.9);
GiaBeNhatThang = LLV (Ref (C, -15), 30);
DK5 = (GiaBeNhatThang <= C*0.9) AND (GiaBeNhatThang >= C*0.8);
DK6 = V > 100000;
Buy = DK1 AND DK2 AND DK3 AND DK4 AND DK5 AND DK6;
Filter = Buy;