SMA21:=(SMA(HIGH,21,2) * 1.05),colorred;
SMA21乖离:(C-SMA21)/SMA21*100,colorred;
DRAWICON(crOSS(C,SMA21),0,1);
DRAWICON(CROSS(SMA21,C),0,2);
SMA21乖离金叉:(BARSLAST(C<SMA21))*(-1)*(-1),nodraw,colorred;
SMA21乖离死叉:(BARSLAST(C>SMA21))*(-1),nodraw,colorgreen;
HORLINE(C>0,0,2,3),colorwhite;
MA10:=MA(CLOSE,10),coloryellow;
MA10乖离:(C-MA10)/MA10*100,coloryellow;
DRAWICON(CROSS(C,MA10),0,5) ;
DRAWICON(CROSS(MA10,C),0,6) ;
MA10乖离金叉:(BARSLAST(C<MA10))*(-1)*(-1),nodraw,coloryellow;
MA10乖离死叉:(BARSLAST(C>MA10))*(-1),nodraw,colorblue;
DRAWTEXT((CROSS(C,SMA21) AND C>MA10) OR (CROSS(C,MA10) AND C>SMA21),L-(H-L),'突'),coloryellow;
DRAWTEXT((CROSS(SMA21,C) AND C<MA10) OR (CROSS(MA10,C) AND C<SMA21),L-(H-L),'弱'),colorblue;