NSYJ0:=(HY_INDEXC-REF(HY_INDEXC,1))/REF(HY_INDEXC,1)*100;
NS1:=STRSPACE(VAR2STR(NSYJ0,2));
NSYJ1:=(REF(HY_INDEXC,1)-REF(HY_INDEXC,2))/REF(HY_INDEXC,2)*100;
NS2:=STRSPACE(VAR2STR(NSYJ1,2));
NSYJ2:=(REF(HY_INDEXC,2)-REF(HY_INDEXC,3))/REF(HY_INDEXC,3)*100;
NS3:=STRSPACE(VAR2STR(NSYJ2,2));
NSYJ3:=(REF(HY_INDEXC,3)-REF(HY_INDEXC,4))/REF(HY_INDEXC,4)*100;
NS4:=STRSPACE(VAR2STR(NSYJ3,2));
NSYJ4:=(REF(HY_INDEXC,4)-REF(HY_INDEXC,5))/REF(HY_INDEXC,5)*100;
NS5:=STRSPACE(VAR2STR(NSYJ4,2));
NS6:=VARCAT(NS5,NS4);
NS7:=VARCAT(NS3,NS2);
NSA:=VARCAT(NS6,NS7);
NSA0:=VARCAT(NSA,NS1);
NSYJ买线:=EMA(C,2);
NSYJ卖线:=EMA(SLOPE(C,21)*20+C,42);
买:=CROSS(NSYJ买线,NSYJ卖线);
卖:=CROSS(NSYJ卖线,NSYJ买线);
STICKLINE(NSYJ买线>=NSYJ卖线,L,H,0.0,1),COLORRED;
STICKLINE(NSYJ买线>=NSYJ卖线,C,O,3,1),COLORRED;
STICKLINE(NSYJ买线>=NSYJ卖线 AND C<O,C,O,3,0),COLORRED;
STICKLINE(NSYJ买线<NSYJ卖线,L,H,0.0,1),COLOR228822;
STICKLINE(NSYJ买线<NSYJ卖线,C,O,3,1),COLOR228822;
STICKLINE(NSYJ买线<NSYJ卖线 AND C<O,C,O,3,0),COLOR228822;
J:=(L+H+C)/3;
N:=EMA(J,10);
S:=REF(N,1);
STICKLINE(N>S ,N ,S ,-1 ,0 ),COLOR00AAFF;
STICKLINE(N<S ,S ,N ,-1 ,0 ),COLORBLUE;
DRAWTEXT(N>S AND C>O AND C>REF(C,1) AND NOT(REF(N>S,1)),S*0.98,'主力出击'),COLORWHITE;
MA5:=MA(C,5);
DR2:=ABS(C-REF(C,30));
VR2:=SUM(ABS(C-REF(C,1)),30);
ER2:=DR2/VR2;
WX2:=ER2*(0.8-2/24)+2/24;
WU2:=WX2*WX2;
WS2:=ABS(((3.48*C+H+L)/4-EMA(C,20))/EMA(C,20));
WS3:=DMA(((2.15*C+L+H)/4),WS2);
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;