M1:=2;M2:=60;
MID1:=(3*CLOSE+LOW+OPEN+HIGH)/6;
乖离率:(SMA(MID1,M1,1)-MA(SMA(MID1,2,1),M2))/MA(SMA(MID1,2,1),M2)*100,COLOR999999;
MID:=乖离率;
MA1:(10*MID+9*REF(MID,1)+8*REF(MID,2)+7*REF(MID,3)+6*REF(MID,4)+5*REF(MID,5)
+4*REF(MID,6)+3*REF(MID,7)+2*REF(MID,8)+1*REF(MID,9))/55,COLOR0000DD;
MA2:EMA(MA1,8),COLORWHITE; {MA1取普通平均值}
IF(MA1<=REF(MA1,1) ,MA1,DRAWNULL),COLOR22FF22;
IF(MA2<=REF(MA2,1),MA2,DRAWNULL),COLOR33FF33;
{长中短周期把握}
N1A:=BArslAST(crOSS(C,MA(C,13)));
N2A:=BARSLAST(CROSS(MA(C,13),C));
短线跟踪:IF(N1A
N2B:=BARSLAST(CROSS(MA(C,60),C));
中线跟踪:IF(N1B
N2C:=BARSLAST(CROSS(MA(C,250),C));
长线跟踪:IF(N1C