DE:=CONST(LLV(L,90));
JI:=CONST(HHV(H,90))-DE;
DE_K:=DE+JI/3*2;
JI_K:=JI/2;
RSV:=(CLOSE-LLV(LOW,89))/(HHV(HIGH,89)-LLV(LOW,89))*100;
DE_A:=CONST(LLV(RSV,90));
DD_A:=CONST(HHV(RSV,90))-DE_A;
R:=(RSV-DE_A)/DD_A;
RSV1:=R*JI_K+DE_K;
K:SMA(RSV1,3,1);
D:SMA(K,3,1);
J:3*K-2*D,LINETHICK2;
DE_M:=DE+JI/3;
JI_M:=JI/2;
KDL:=CONST(LLV(EMA(C,26),90));
KDH:=CONST(HHV(EMA(C,26),90))-KDL;
R_K1:=(EMA(C,12)-KDL)/KDH;
R_K2:=(EMA(C,26)-KDL)/KDH;
DIF~:(R_K1-R_K2)*JI*1.5+DE_M,COLORGREEN,LINETHICK2;
DEA~:EMA(DIF~,9),COLORWHITE,LINETHICK1;
MACD~:=(DIF~-DEA~)*2+DE_M;
STICKLINE(MACD~>=DE_M,MACD~,DE_M,0,0),COLORLIBLUE;
D_1:=MACD~>H AND H>=DE_M AND DE_M>=L;
D_2:=MACD~>H AND H>=L AND L>DE_M;
D_3:=H>MACD~ AND MACD~>=L AND L>DE_M;
D_4:=H>MACD~ AND MACD~>DE_M AND DE_M>=L;
STICKLINE(D_1>0,H,DE_M,0,0),COLORYELLOW;
STICKLINE(D_2,H,L,0,0),COLORYELLOW;
STICKLINE(D_3,MACD~,L,0,0),COLORYELLOW;
STICKLINE(D_4,MACD~,DE_M,0,0),COLORYELLOW;
D_5:=MACD~<L AND L<=DE_M AND DE_M<=H;
D_6:=MACD~<L AND H<DE_M;
D_7:=L<MACD~ AND MACD~<=H AND H<DE_M;
D_8:=L<MACD~ AND MACD~<DE_M AND DE_M<=H;
STICKLINE(MACD~<DE_M,DE_M,MACD~,0,0),COLORAA00AA;
STICKLINE(D_5,DE_M,L,0,0),COLORYELLOW;
STICKLINE(D_6,H,L,0,0),COLORYELLOW;
STICKLINE(D_7,H,MACD~,0,0),COLORYELLOW;
STICKLINE(D_8,DE_M,MACD~,0,0),COLORYELLOW;
L_00:DE_K;
L_20:JI_K/5+DE_K;
L_80:JI_K*4/5+DE_K;
L_100:JI_K+DE_K;
双线持币:HHV(MA(HIGH,3),2),COLORGREEN,LINETHICK;
单线持股:LLV(MA(HIGH,3),1),COLORYELLOW,LINETHICK;
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
DRAWICON(BU,L-0.1,1);
DRAWICON(SEL,H+0.1,2);
STICKLINE(买线>=卖线,LOW,HIGH,0.0,1),COLORRED;
STICKLINE(买线>=卖线,CLOSE,OPEN,2,1),COLORRED;
STICKLINE(买线<卖线,LOW,HIGH,0.0,1),COLOR32CD32;
STICKLINE(买线<卖线,CLOSE,OPEN,2,1),COLOR32CD32;DRAWICON((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2))
AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),LOW*0.98,7);
DRAWICON((ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2))
AND (REF(ZIG(3,5),2)>=REF(ZIG(3,5),3)),HIGH*1.02,8);
VAR1:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG(3,10),2);
VAR2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<REF(ZIG(3,10),2);
STICKLINE(VAR1,C,O,3,0),COLORYELLOW,LINETHICK2;
STICKLINE(VAR1,C,O,1,0),COLORYELLOW,LINETHICK2;
STICKLINE(VAR1,H,L,0,0),COLORYELLOW,LINETHICK2;
STICKLINE(VAR2,C,O,3,0),COLORFF0FF0,LINETHICK2;
STICKLINE(VAR2,C,O,2,0),COLORFF0FF0,LINETHICK2;
STICKLINE(VAR2,H,L,1,0),COLORFF0FF0,LINETHICK2; |