这个EA为何挂不了单,请高手指导

楼主  收藏   举报   帖子创建时间:  2019-05-05 14:46 回复:0 关注量:156

nt start()
   {
    int    ticket,expiration;
    double point,bid,ask;
//----
    point=MarketInfo(Symbol(),MODE_BID);
    expiration=TimeCurrent( )+PERIOD_D1*60 - (Hour( ) +1)*60;
    if(MessageBox("编写  ",0))

//----
    bid=Bid;
    ask=Ask;   
    for(int i1=10;i1>0;i1--)
    {
        bid-=200*point;
    ask+=200*point;
    ticket=OrderSend(Symbol(),OP_BUYSTOP,0.01,ask,30,ask-300*Point,ask+300*Point,"EA编写:",20090202,expiration,Blue);
    ticket=OrderSend(Symbol(),OP_SELLSTOP,0.01,bid,30,bid+300*Point,bid-300*Point,"EA编写:",20090202,expiration,Red);
   //ticket=OrderSend(Symbol(),OP_BUYLIMIT,0.01,Ask-30*Point,3,0,Bid+300*Point,"EA编写:",20090202,expiration,Yellow);
   // ticket=OrderSend(Symbol(),OP_SELLLIMIT,0.01,Bid+30*Point,3,0,Ask-300*Point,"EA编写:",20090202,expiration,Green);
   if(ticket<1)
      {
       int error=GetLastError();
       Print("Error = "+error);
       return(0);
      }
//----
    OrderPrint();
    }
    alert("编写");


   return(0);

打赏