N:= 5 ;
M:=13 ;
MA5:MA(C,N),COLORWHITE;
MA18:=MA(CLOSE,18);
MA13:MA(C,M),COLORGREEN,LINETHICK2;
VAR1:=C=HHV(C,4) AND REF(C,1)=LLV(C,4);
VAR2:=C=LLV(C,4) AND (REF(C,1)=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)=REF(C,1);
A:=(3*C+L+O+H)/6;
VAR4:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
CB:=EMA(VAR4,13);
{红}STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3,0),COLOR0000FF;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF;
{蓝}STICKLINE(CLOSE50,2) AND CROSS(MA(DX,2),DX);
DRAWTEXT(FILTER(卖=1,1),HIGH*1.02,'卖'),COLORGREEN;
买:=LLV(DX,2)=LLV(DX,7) AND COUNT(DX=REF(MA18,3) AND CROSS(CLOSE,MA18);
DRAWTEXT(跟,LOW*0.96,'跟'),COLORCC66FF;
射线3X: DRAWLINE(L=LLV(L,3),L,C=HHV(C,3),L,0),LINETHICK3,COLOR9A90FF;
趋势射线7: DRAWLINE(H=HHV(H,7),H,L=LLV(L,7),L,0),LINETHICK3,COLOR9AFF89;
射线7X: DRAWLINE(L=LLV(L,7),L,H=HHV(H,7),L,0),LINETHICK3,COLOR9AFF89;
趋势射线21: DRAWLINE(H=HHV(H,21),H,L=LLV(L,21),L,0),LINETHICK3,COLORC100FF;
射线21X: DRAWLINE(L=LLV(L,21),L,H=HHV(H,21),L,0),LINETHICK3,COLORC100FF;
趋势射线35: DRAWLINE(H=HHV(H,35),H,L=LLV(L,35),L,0),LINETHICK3,COLORC1005B;
射线35X: DRAWLINE(L=LLV(L,35),L,H=HHV(H,35),L,0),LINETHICK3,COLORC1005B;
趋势射线49: DRAWLINE(H=HHV(H,49),H,L=LLV(L,49),L,0),LINETHICK3,COLORYELLOW;
射线49X: DRAWLINE(L=LLV(L,49),L,H=HHV(H,49),L,0),LINETHICK3,COLORYELLOW;
CXH:=STRTONUM(STRRIGHT(DATESTR(CURRENTDATE),1));
WARNING('',CURRENTTIME>180000 and (CXH=1 OR CXH=6));
DRAWTEXTREL(10 ,10 ,'');