N:=21;M:=55;Q:=3;
回归:=EMA(SLOPE(CLOSE,N)*20+CLOSE,M)*1,COLORMAGENTA,LINETHICK3;
平滑:=EMA(CLOSE,Q),COLORYELLOW,LINETHICK2;
简单差:=平滑-回归;
DRAWICON(CROSS(ZIG(3,8),REF(ZIG(3,8),1)),平滑,9);
日:=120; 昨前:=3;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
HIGH1:REFDATE(高1,DATE),COLORRED,LINETHICK3;
HIGH2:REFDATE(H1,DATE),COLORYELLOW,LINETHICK3;
LOW2:REFDATE(H5,DATE),COLORYELLOW,LINETHICK3;
LOW1:REFDATE(低1,DATE),COLORGREEN,LINETHICK3;
LCZ:=REF(CLOSE,1);
WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
WR10Z:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;
活跃:=(WRSI-WR10Z);
活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2));
DRAWTEXT_FIX(1,0.50,0,15.1,STRCAT(STRCAT('活跃:',CON2STR(活跃度比,2)),'%')),COLORYELLOW;
M5:=MA(C,5);
M10:=MA(C,10);
M20:=MA(C,20);
MM:=MIN(M5,M20);
MM2:=MIN(M10,M20);
HM:=MAX(M5,M20);
HM2:=MAX(M10,M20);
TC1:DRAWBAND(MM,RGB(255,0,0),MM2,0);
TC2:DRAWBAND(HM2,RGB(0,255,255),HM,0);
DRAWKLINE(H,O,L,C);
MA5:MA(C,5);
MA10:MA(C,10);
MA60:MA(C,20);