Hi all,

In advance - thanks for your help and suggestions.


If I run this (just a test - no exception handling or practical application as yet) on the ONIT() function:

Code:
      MqlTradeRequest request;
      MqlTradeResult result;  
     request.symbol = Symbol();   
    request.volume = 0.1;   
    request.action = TRADE_ACTION_PENDING;   
    request.type = ORDER_TYPE_BUY_STOP;   
    request.price = 1.208;
      request.sl=0; 
   request.tp=0;   
      request.deviation=5;   
    request.type_filling = ORDER_FILLING_FOK;  
     OrderSend(request, result);







This works fine - - - If however, I run this:

Code:
SymbolInfoTick(Symbol(), tick);
MqlTradeRequest request;
MqlTradeResult result;
request.symbol = Symbol();
  request.volume = 0.1; 
request.action = TRADE_ACTION_DEAL;
  request.type = ORDER_TYPE_BUY;
request.price = tick.ask;
request.sl=0;
request.tp=0; 
 request.deviation=5;
request.type_filling = ORDER_FILLING_FOK;
OrderSend(request, result);
I get nothing... (4756 error code returned)

So I can place pending orders - but cannot place at-market price orders.

FYI - I've printed the tick.ask attribute to the console and its fine - a normal 5 digit double-type response.

I've even applied NormalizeDouble() to tick.ask return value in the hopes that may standardise some aspect of it.



Please... any ideas?


Thanks again