E:=30;
上轨:WMA(HIGH,30),colorFF;
下轨:WMA(LOW,30),colorFF0000;
中轨:=WMA(CLOSE,30);
PARTLINE(CLOSE<上轨,上轨),LINETHICK3,colorFF0000;
PARTLINE(CLOSE>上轨,上轨),LINETHICK3,colorFF;
PARTLINE(CLOSE<上轨,下轨),LINETHICK3,colorFF0000;
PARTLINE(CLOSE>上轨,下轨),LINETHICK3,colorFF;
STICKLINE(CLOSE>上轨,上轨,下轨,0.8,1),colorFF;
STICKLINE(CLOSE<下轨,上轨,下轨,0.8,1),colorFF0000;
A:=CROSS(CLOSE,上轨);
B:=CROSS(下轨,CLOSE);
D:=A AND COUNT(A,BARSLAST(B))=1;
E:=B AND COUNT(B,BARSLAST(A))=1;
DRAWICON(D,LOW,4);
DRAWICON(E,HIGH,5);
DRAWTEXT(E,HIGH,'卖出'),colorFFFFFF;
DRAWTEXT(D,LOW,'买入'),colorFFFFFF;