上轨:EMA(H,25),COLORGREEN,LINETHICK2;
下轨:EMA(L,25),COLORGREEN,LINETHICK2;
NA1:=PLOYLINE(C>上轨,上轨);
IF(C>上轨,NA1,DRAWNULL),COLORRED,LINETHICK2;
NB1:=PLOYLINE(C>下轨,下轨);
IF(C>下轨,NB1,DRAWNULL),COLORRED,LINETHICK2;
{变色K线}
QS:=(C+上轨+下轨)/3;
STICKLINE(C>REF(QS,1) AND O>=C,C,O,-1,0),COLORRED;
STICKLINE(C>REF(QS,1) AND O>=C,L,H,0,0),COLORRED;
STICKLINE(C<=REF(QS,1) AND O<=C,O,C,-1,1),COLORCYAN;
STICKLINE(C<=REF(QS,1) AND O<=C,O,L,0,1),COLORCYAN;
STICKLINE(C==REF(QS,1) AND O<=C,C,H,0,1),COLORCYAN;
{涨停K线}
ZT_1:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1);
ZT_2:=ZT_1>=0.099 AND CLOSE=HIGH AND LOW!=HIGH;
STICKLINE(ZT_2,OPEN,CLOSE,2,0),COLORYELLOW;
{KDJ测顶底}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
{文字或图标任换一种:}
{DRAWTEXT(CROSS(100,J),H*1.02,'顶'),COLORGREEN;
DRAWTEXT(CROSS(J,0),L*0.97,'底'),COLORRED;}
{2.∧∨图标}
{DRAWICON(CROSS(J,0),L*0.98,34);
DRAWICON(CROSS(100,J),H*1.02,35);}
{3.笑哭图标}
DRAWICON(CROSS(J,0),L*0.98,5);
DRAWICON(CROSS(100,J),H*1.02,6);
{九转}
A1:=C>REF(C,4);