开拓者期货期权程序化系统交易论坛

标题: 这个代码为什么 放到 [打印本页]

作者: yimatouzi    时间: 2016-11-16 15:16:41     标题: 这个代码为什么 放到

Params

Vars
   NumericSeries MA15(0);

Begin
     if (barstatus==0) { SetGlobalVar(0,0);setglobalvar(1,0);}
   
    PlotNumeric("MA15",averageFC(close,15),0,-1,0);
    MA15=averageFC(close,15);
        If(  A_Totalposition==0 and GetGlobalVar(0)==0 and  close[1]<ma15 and close>=Ma15  and A_OpenOrderLot==0 and barstatus==2 )
        {
         A_SendOrder(enum_buy,enum_entry,1,Q_askprice+5*minmove*pricescale,0,0);
         SetGlobalVar(0,1);
        }
       
    If(A_TotalPosition >0 ) SetGlobalVar(0,0);
    If(a_totalposition>0  and Close<close[1] and GetGlobalVar(1)==0 )
        {
         A_SendOrder(enum_sell,enum_exit,1,Q_bidprice-5*minmove*pricescale,0,0);;
         SetGlobalVar(1,1);
        }
        If(A_TotalPosition==0) SetGlobalVar(1,0);

       
        End
               为什么这个程序  盘中模拟没有反应呢??  有什么地方没做对么

      




欢迎光临 开拓者期货期权程序化系统交易论坛 (http://bbs.tb18.net/) Powered by Discuz! X2