源码如下:
DRAWBAND(EMA(C,12),RGB(166,16,160),EMA(COST(65),30),RGB(0,0,0));DRAWKLINE(H,O,L,C);
E:EMA(C,5);E1:EMA(C,12);E2:EMA(C,50),LINETHICK2;E3:MA(C,120);DIF:=(EMA(C,12)-EMA(C,26));DEA:=EMA(DIF,9);
A:=CROSS(C,E2) AND DIF>=DEA AND DIF>=0 AND E2>REF(E2,1) AND C>O;
DRAWTEXT(A,L-0.03,'狙击');
STICKLINE(A,O,C,6,0),COLORMAGENTA;
STICKLINE(A,O,C,3,0),COLORYELLOW;
平均成本:COST(1),COLORLIBLUE;
A1:=CROSS(C,E3) AND DIF>=DEA AND C>O;
STICKLINE(A1,O,C,6,0),COLORRED;
STICKLINE(A1,O,C,3,0),COLORWHITE;
A2:=A AND A1;DRAWTEXT(A2,H+0.03,'黑马'),COLORYELLOW;A3:=REF((C<O),1);
B:=H>O AND C=H AND L<O AND L>REF(L,1) AND A3;STICKLINE(B,H,O,1,0),COLORYELLOW;
DRAWTEXT(B,L-0.066,'★'),COLORYELLOW;
C6:=REF(C,1);
涨停:=IF((C-C6)*100/C6>=(10-0.01*100/C6),1,0);
STICKLINE(涨停,OPEN,CLOSE,1,0),COLORLIRED;
STICKLINE(涨停,H,L,0,0),COLORLIRED;
DRAWTEXT(涨停,H+0.10,'涨停'),COLORYELLOW;
DD:=COST(65);DD1:EMA(DD,30),COLORRED;
LS:=CROSS(C,DD1) AND DIF>=0 AND REF((C<O),1) AND C>O AND E>E1 AND E1>E2;STICKLINE(LS,O,C,1,0),COLORLIMAGENTA;
DRAWTEXT(LS,L-0.18,'@★★★★★五星上将')COLORRED;
K:=CROSS(C,DD1) AND DIF>=0 AND E>E1 AND E1>E2 AND DIF>=DEA;STICKLINE(K,O,C,5,0),COLORMAGENTA;STICKLINE(K,O,C,2,0),COLORYELLOW;
DRAWTEXT(K,C+0.18,'@★★★★★五星上将')COLORYELLOW;