N:=60;
M:=60;
MIDA:=MA(C,M);
VART1:=POW((C-MIDA),2);
VART2:=MA(VART1,M);
VART3:=SQRT(VART2);
UPPERA:=MIDA+2*VART3;
LOWERA:=MIDA-2*VART3;
BOLL:REF(MIDA,1);
UB:REF(UPPERA,1);
LB:REF(LOWERA,1),colorred;
MA5:MA(C,N),COLORCC3299,LINETHICK2;
中证:(UB+BOLL)/2;
MA844:MA(C,844),colorred,LINETHICK2;
买点:= CROSS(C,MA5) AND C/REF(C,1)>1.01 AND C>MA5 OR CROSS(C,MA844);
买3点:=买点 AND FILTER(FILTER(买点,5),20);
STICKLINE(买3点,OPEN,CLOSE,3,0),colorred;
卖点:=CROSS(MA5,C) AND FILTER(CROSS(MA5,C),12) AND C>BOLL;
STICKLINE(卖点,OPEN,CLOSE,3,0),colorgreen;
卖1点:=CROSS(H,UB) AND FILTER(CROSS(H,UB),10);
STICKLINE(卖1点,OPEN,CLOSE,3,0),colorgreen;
清1仓:=((C+O)/2)/1.01<UB AND CROSS(UB/1.01,C) ;
清仓:=FILTER(清1仓,6);
止损:=CROSS(BARSLAST(买点),C);
202108202133.jpg
|