N:=4;
N1:=21;
0,COLORGREEN;
30,POINTDOT,COLORRED;
45,POINTDOT;
60,POINTDOT;
X_1:=EMA(EMA(EMA(CLOSE,N),N),N);
X_2:=X_1-REF(X_1,1)+X_1;
X_3:=MA(X_2,N1);
X_4:=ATAN((X_3/REF(X_3,1)-1)*100)*180/3.1416;
趋势异动:IF(X_4>0,X_4,0);
STICKLINE(趋势异动>REF(趋势异动,1),0,趋势异动,0.1,1),COLORRED;
X_5:=crOSS(趋势异动,10) OR CROSS(趋势异动,20) OR CROSS(趋势异动,30) OR CROSS(趋势异动,40) OR CROSS(趋势异动,50) OR CROSS(趋势异动,60) OR CROSS(趋势异动,70) OR CROSS(趋势异动,80);
X_6:=CROSS(10,趋势异动) OR CROSS(20,趋势异动) OR CROSS(30,趋势异动) OR CROSS(40,趋势异动) OR CROSS(50,趋势异动) OR CROSS(60,趋势异动) OR CROSS(70,趋势异动) OR CROSS(80,趋势异动);
DRAWICON(X_5,趋势异动,1);
DRAWICON(X_6,趋势异动,2);