DIF:100*(EMA(CLOSE,5)/EMA(CLOSE,34)-1);
' x: `3 V8 O \2 z4 fDEA:EMA(DIF,5);BOLL:=MA(CLOSE,21);4 @# N2 d: X! g/ K& l' ~
MACDDIF-DEA)*2,COLORSTICK;* K: o, _% K& n- P. ]0 P2 ^, }
UB:=BOLL+2*STD(CLOSE,21);+ d1 K/ X* x. Q) Z7 ]
LB:=BOLL-2*STD(CLOSE,21);; [( D; X- M: x& T; _
T1:=LONGCROSS(CLOSE,LB*0.98,2);T2:=LONGCROSS(UB,CLOSE*1.02,2);
! R' N: W6 v. aGT:=DIF-REF(DIF,1);T3:=LONGCROSS(GT,0,2);
, e7 ]2 c- Z' a0 ~6 w7 O$ eMT:=MACD-REF(MACD,1);T4:=LONGCROSS(MT,0,2);
1 d* W, m' {2 |' N* f. HGD:=LONGCROSS(DIF,DEA,3); M5:=MA(CLOSE,5);( ~' Y% H4 j, Y: [2 f
A1:=SUMBARS(GD,1);A2:=SUMBARS(GD,2);A3:=SUMBARS(GD,3);
6 z* t9 }/ K! p, A% X$ }' kB1:=SUMBARS(T4,1);B2:=SUMBARS(T4,2);B3:=SUMBARS(T4,3);
; P/ c# j M/ V" q( eM0:=REF(MACD,B1*(B1>2)),NODRAW; M1:=MIN(REF(MACD,B2),REF(MACD,B3)),NODRAW;' j1 T2 X, V) |& ^2 Y; b
Z0:=REF(DIF,A1*(A1>2)),NODRAW;Z1:=MIN(REF(DIF,A2),REF(DIF,A3));
. F0 c8 K" @& H, P I# X背离选:=DIF>Z1 AND MACD>M1 AND CROSS((M5-REF(M5,1)),0),NODRAW,COLORRED;
% X0 z- |6 c/ Z0 J9 A7 V减仓:=(CLOSE |