N:=40;
T:=BArslAST(H<REF(H,1) AND REF(H,1)>REF(H,2));
HH:=REF(H,T+1);
LL:=FINDLOW(L,T=0,10,1);
LH:=SUM(H>REF(H,1),10);
ZF:=(HH-LL)/LL*100;
TT:=BARSLAST(T=0 AND ZF>20 AND LH>2);
T1:=SUMBARS(TT=0,1);
T2:=SUMBARS(TT=0,2);
T3:=SUMBARS(TT=0,3);
T4:=SUMBARS(TT=0,4);
H1:=REF(HH,T1-1);
H2:=REF(HH,T2-1);
H3:=REF(HH,T3-1);
H4:=REF(HH,T4-1);
AH:=MAX(MAX(MAX(H1,H2),H3),H4);
AL:=MIN(MIN(MIN(H1,H2),H3),H4);
BL:=AH/AL<1.15;
TJ:=COUNT(crOSS(C,H1),TT+1)=1 AND CROSS(C,H1);
TJ1:=H4<H3 AND H3<H2 AND H2<H1;
XG:=TJ AND BL AND T4<N AND TJ1;
XG1:=COUNT(XG,T4+1)=1 AND XG;
STICKLINE(XG1,H,L,0,1),COLORFFFFFF;
STICKLINE(XG1,C,O,3.2,0),COLOR555555;
STICKLINE(XG1,C,O,2.6,0),COLOR777777;
STICKLINE(XG1,C,O,1.9,0),COLOR999999;
STICKLINE(XG1,C,O,1.1,0),COLORCCCCCC;
STICKLINE(XG1,C,O,0.3,0),COLORCCDDBB;
DRAWICON(XG1,L*0.96,1);
{
选股公式:
N:=40;
T:=BARSLAST(H<REF(H,1) AND REF(H,1)>REF(H,2));
HH:=REF(H,T+1);
LL:=FINDLOW(L,T=0,10,1);
LH:=SUM(H>REF(H,1),10);
ZF:=(HH-LL)/LL*100;
TT:=BARSLAST(T=0 AND ZF>20 AND LH>2);
T1:=SUMBARS(TT=0,1);
T2:=SUMBARS(TT=0,2);
T3:=SUMBARS(TT=0,3);
T4:=SUMBARS(TT=0,4);
H1:=REF(HH,T1-1);
H2:=REF(HH,T2-1);
H3:=REF(HH,T3-1);
H4:=REF(HH,T4-1);
AH:=MAX(MAX(MAX(H1,H2),H3),H4);
AL:=MIN(MIN(MIN(H1,H2),H3),H4);
BL:=AH/AL<1.15;
TJ:=COUNT(CROSS(C,H1),TT+1)=1 AND CROSS(C,H1);
TJ1:=H4<H3 AND H3<H2 AND H2<H1;
A:=TJ AND BL AND T4<N AND TJ1;
XG:COUNT(A,T4+1)=1 AND A;
}