MA1:="MM1.M1#WEEK";
MA2:="MM1.M2#WEEK";
MA3:="MM1.M3#WEEK";//调用周线的均线指标
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 THEN BUY(HOLDING=0,35%,MARKET),PERTRADER;
IF MA2<MA1 AND MA2<MA3 AND B 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);
//这个复核功能目前是不支持的。
//CHECKSIG_MIN(BK,'A',2,'C',0);//出信号2分钟后下单,不复核
//CHECKSIG_MIN(SK,'A',2,'C',0);//出信号2分钟后下单,不复核
//这个需要在实际交易时候选择固定轮询模式即可
//CHECKSIG_MIN(SP,'A',0,'C',0);//出信号立即下单,不复核
//CHECKSIG_MIN(BP,'A',0,'C',0);//出信号立即下单,不复核
//
另外指标mm,需要改下变量定义方式:
M1:MA(C,5);
M2:CLOSE;
M3:MA(C,10);
复制到金字塔中,提示错误。
MA1:="MM1.M1#WEEK";
MA2:="MM1.M2#WEEK";
MA3:="MM1.M3#WEEK";//调用周线的均线指标
你这里是不是写错了呢?
是MM吧,不是MM1