SJ:=1;
LHS:1,NODRAW;
A:=EMA2(HIGH*SJ,30);
B:=EMA2(LOW*SJ,30);
A1:=EMA2(HIGH*SJ,150),LINETHICK1;
B1:=EMA2(LOW*SJ,150)*LHS,LINETHICK1;
S1:=CROSS(CLOSE,EMA2(HIGH,150))*LHS,LINETHICK1;
X1:=CROSS(EMA2(LOW,150),CLOSE)*LHS,LINETHICK1;
WS1:=BARSLAST(S1)+1*LHS,LINETHICK1;
WX1:=BARSLAST(X1)+1*LHS,LINETHICK1;
SS1:=CROSS(SUM(S1,WX1),0.5)*LHS,LINETHICK1;
XX1:=CROSS(SUM(X1,WS1),0.5)*LHS,LINETHICK1;
S:=CROSS(CLOSE,EMA2(HIGH,30))*LHS,LINETHICK1;
X:=CROSS(EMA2(LOW,30),CLOSE)*LHS,LINETHICK1;
WS:=BARSLAST(S)+1*LHS,LINETHICK1;
WX:=BARSLAST(X)+1,LINETHICK1;
SS:=CROSS(SUM(S,WX),0.5)*LHS,LINETHICK1;
XX:=CROSS(SUM(X,WS),0.5)*LHS,LINETHICK1;
FILLRGN(CLOSE>EMA2(HIGH,30),EMA2(HIGH,30),EMA2(LOW,30),RGB(124,20,126));
FILLRGN(CLOSE<EMA2(LOW*SJ,30),EMA2(LOW,30),EMA2(HIGH,30),RGB(0,75,0));
FILLRGN(CLOSE>EMA2(HIGH*SJ,150),EMA2(HIGH,150),EMA2(LOW,150),RGB(75,0,0));
FILLRGN(CLOSE<EMA2(LOW,150),EMA2(LOW,150),EMA2(HIGH,150),RGB(30,75,158));
PARTLINE(CLOSE>EMA2(HIGH,30),EMA2(HIGH,30),COLORMAGENTA);
PARTLINE(CLOSE<EMA2(HIGH,30),EMA2(HIGH,30),COLORGREEN);
PARTLINE(CLOSE>EMA2(LOW,30),EMA2(LOW,30),COLORMAGENTA);
PARTLINE(CLOSE<EMA2(LOW,30),EMA2(LOW,30),COLORGREEN);
PARTLINE(CLOSE>EMA2(HIGH,150),EMA2(HIGH,150),COLORRED);
PARTLINE(CLOSE<EMA2(HIGH,150),EMA2(HIGH,150),COLORBLUE);
PARTLINE(CLOSE>EMA2(LOW,150),EMA2(LOW,150),COLORRED);
PARTLINE(CLOSE<EMA2(LOW*SJ,150),EMA2(LOW,150),COLORBLUE);
STICKLINE(SUM(X,WS)>0.5 && CLOSE>=OPEN,OPEN,CLOSE,COLORCYAN,1);
STICKLINE(SUM(X,WS)>0.5 && CLOSE<OPEN,OPEN,CLOSE,COLORCYAN,0);
DRAWLINE(SUM(X,WS)>0.5,HIGH*SJ,CLOSE>OPEN,CLOSE,COLORCYAN);
DRAWLINE(SUM(X,WS)>0.5,LOW,CLOSE>OPEN,OPEN,COLORCYAN);
DRAWLINE(SUM(X,WS)>0.5,HIGH,CLOSE<OPEN,OPEN,COLORCYAN);
DRAWLINE(SUM(X,WS)>0.5,LOW,CLOSE<OPEN,CLOSE,COLORCYAN);
DRAWLINE(SUM(X,WS)>0.5,HIGH,CLOSE=OPEN,LOW,COLORCYAN);
STICKLINE(SUM(S,WX)>0.5 && CLOSE>=OPEN,OPEN,CLOSE,COLORRED,1);
STICKLINE(SUM(S,WX)>0.5 && CLOSE<OPEN,OPEN,CLOSE,COLORRED,0);
DRAWLINE(SUM(S,WX)>0.5,HIGH,CLOSE>OPEN,CLOSE,COLORRED);
DRAWKLINE1(H,O,L,C);
多:CROSS(CLOSE>EMA2(HIGH,150)&&CLOSE>EMA2(LOW,150),0.5),WORD(0,’多’),VALIGN0,COLORRED,FONTSIZE20;
平多:CROSS(NOT(CLOSE>EMA2(HIGH,150)&&CLOSE>EMA2(LOW,150)),0.5)&&COUNT(CROSS(NOT(CLOSE>EMA2(HIGH,150)&&CLOSE>EMA2(LOW,150)),0.5),BARSLAST(多)),WORD(1,’平多’),COLORGREEN,FONTSIZE20;
空:CROSS(CLOSE<EMA2(HIGH,150)&&CLOSE<EMA2(LOW*SJ,150),0.5),WORD(0,’空’),COLORGREEN,FONTSIZE20,VALIGN0;
平空:CROSS(NOT(CLOSE<EMA2(HIGH,150)&&CLOSE<EMA2(LOW*SJ,150)),0.5)&&COUNT(CROSS(NOT(CLOSE<EMA2(HIGH,150)&&CLOSE<EMA2(LOW*SJ,150)),0.5),BARSLAST(空)),WORD(1,’平空’),COLORRED,FONTSIZE20;
多,BK;
平多,SP;
空,SK;
平空,BP;
AUTOFILTER;