有效期内:=1;
SG:=EMA(有效期内 AND H,30);
XG:=EMA(有效期内 AND L,30);
S:=CROSS(C,EMA(H,30));
X:=CROSS(EMA(L,30),C);
WS:=BARSLAST(S)+1;
WX:=BARSLAST(X)+1;
SS:=CROSS(SUM(S,WX),0.5);
XX:=CROSS(SUM(X,WS),0.5);PARTLINE(有效期内 AND CLOSE>EMA(HIGH,30),EMA(HIGH,30),COLORRED),LINETHICK2;
PARTLINE(有效期内 AND CLOSE>EMA(LOW,30),EMA(LOW,30),COLORRED),LINETHICK2;
PARTLINE(有效期内 AND CLOSE<EMA(HIGH,30),EMA(HIGH,30),COLORGREEN),LINETHICK2;
PARTLINE(有效期内 AND CLOSE<EMA(LOW,30),EMA(LOW,30),COLORGREEN),LINETHICK2;
DRAWCOLORKLINE(有效期内 AND CLOSE<EMA(LOW,30),COLORGREEN,0);
DRAWCOLORKLINE(有效期内 AND CLOSE>EMA(HIGH,30),COLORRED,0);
DRAWCOLORKLINE(有效期内 AND CLOSE>EMA(LOW,30)&&CLOSE<EMA(HIGH,30),COLORWHITE,0);
YTJ:=(MONTH<>REF(MONTH,1)||DAY=1);
RKP:=VALUEWHEN(DAY<>REF(DAY,1),OPEN),RGB(255,0,0),LINETHICK1;//每日开盘价格