下载MetaTrader 5

Dear Mr. Rosh, Please tell me which evebts can be recorded on logs ? - 页 2

要添加评论,请登录注册
Rashid Umarov
管理员
11994
Rashid Umarov 2008.03.21 09:08  
You don't handle result given by function OrderSelect(). Try this:
if(SS>=2)
   {
   if (OrderSelect(OrderTicket(),SELECT_BY_TICKET, MODE_TRADES))
      {
      if(Ask+Rebound*Point<OrderStopLoss())
         {
         try=0;
 
         while(try<=10)
            {
            result=OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Rebound*Point,OrderTakeProfit(),0,Green);
            if(! result)
               {
               err=GetLastError();
 
               comment("SS>=2 OrderModify failed with error code=",err);
 
               Print("SS>=2 OrderModify failed with error code=",err);
 
               if (err!=0) break; //error is critically
               try++;
               Sleep(1000);
               }//if(! result)
            if (result==true)
               {
               OrderSelect(OrderTicket(),SELECT_BY_TICKET, MODE_TRADES);
               Comment(" ??? ",OrderStopLoss()," ???? ",Ask);
               KG=false;
               }//if (result==true)
 
            }//while(try<=10)
         }//if(Ask+Rebound*Point<OrderStopLoss())}//if(SS>=2 )
      }
   }
gget
410
gget 2008.03.21 10:25  

Thank you very much !

I try

Wish have a good weekend in London or Moscow ! ! !

12
要添加评论,请登录注册