OrderSendAsync gives error 4756, retcode = 10013

To add comments, please log in or register
Ton de Wilde
12
Ton de Wilde  

 I get the error:

2019.01.02 23:58:00   PlaceOrder: error 4756, retcode = 10013 

4756 : Trade request sending failed

10013: Invalid request

Anyone an idea why this fails??



 MqlTradeRequest req={0};   
   req.action      = TRADE_ACTION_SLTP; 
   req.symbol      = _Symbol; 
   req.magic       = MagicNumber; 
   req.volume      = volume; 
   req.sl          = sl;
   req.tp          = tp;
   req.type        = orderType; 
   req.price       = Price; 
   req.comment     = "com12";
   req.type_filling= ORDER_FILLING_FOK;
   req.type_time   = ORDER_TIME_SPECIFIED;
   req.expiration  = LastTickTime +10;
   MqlTradeResult res={0}; 
   ResetLastError();
   if(!OrderSendAsync(req,res)) 
   { 
     Print(__FUNCTION__,": error ",GetLastError(),", retcode = ",res.retcode); 
   } 

returns "PlaceOrder: error 4756, retcode = 10013"



vars are:

  req.action      = NUM_TRADE_REQUEST_ACTIONS::TRADE_ACTION_SLTP

   req.symbol      = EURUSD

   req.magic       = 120115

   req.volume      = 10

   req.sl          = 2.2685200000000001

   req.tp          = 1.13425

   req.type        = ENUM_ORDER_TYPE::ORDER_TYPE_BUY_LIMIT 

   req.price       = 1.13426

   req.comment     = "com12"

   req.type_filling= ENUM_ORDER_TYPE_FILLING::ORDER_FILLING_FOK

   req.type_time   = ENUM_ORDER_TYPE_TIME::ORDER_TIME_SPECIFIED

   req.expiration  = D'2019.01.02 23:58:10';



To add comments, please log in or register