MA5:MA(CLOSE,5);
MA10:MA(CLOSE,10);
MA20:MA(CLOSE,20);
MA30:MA(CLOSE,30);
MA60:MA(CLOSE,60);
MA120:MA(CLOSE,120)COLOR0000FF;
MA1:="MM.M1#WEEK";
MA2:="MM.M2#WEEK";
MA3:="MM.M3#WEEK";//调用周线的均线指标
MAA1:="MM.M1#DAY";
MAA2:="MM.M2#DAY";
MAA3:="MM.M3#DAY";
MAA4:="MM.M4#DAY";//调用日线的均线指标
AA:=MAA2>MAA1 AND MAA2>MAA3 AND MAA2>MAA4;
BB:=MAA2<MAA1 AND MAA2<MAA3 AND MAA2<MAA4;
A:=C>MA(C,5) AND C>MA(C,10) AND C>MA(C,20) ;
B:=C<MA(C,5) AND C<MA(C,10) AND C<MA(C,20) ;
IF MA2>MA1 AND MA2>MA3 AND A AND AA THEN BUY(HOLDING=0,35%,MARKET),PERTRADER;
IF MA2<MA1 AND MA2<MA3 AND B AND BB THEN BUYSHORT(HOLDING=0,35%,MARKET),PERTRADER;
IF C<=MA(C,10)-5*MINDIFF THEN SELL(HOLDING>0,HOLDING,MARKET);
IF C>=MA(C,10)+5*MINDIFF THEN SELLSHORT(HOLDING<0,HOLDING,MARKET);