Very Strange MQL5 Error

 

Hi guys,

I'm getting Order Send Error 4806 and I don't have any clue why ...

This is the code

if(SubTotalSellOrder() == 0)
 {
  ticket = m_trade.Sell(Lot,NULL,m_symbol.Bid(),0,0,"comment");
  if(ticket > 0)  
   {
    Print("Order send success");
    TakeScreenShot(1280,720,0);
    return;
   }
  else
   {
    Print("Order send error : "+(string)GetLastError());
   }
 }

Any idea?

Thank you!

 
seemore:

Hi guys,

I'm getting Order Send Error 4806 and I don't have any clue why ...

This is the code

Any idea?

Thank you!


Error 4806 is generic trading error. Print and check m_Trade.ResultCode() to get a specific error code.

 
Alain Verleyen:

Error 4806 is generic trading error. Print and check m_Trade.ResultCode() to get a specific error code.


Hi, thank you for you reply.

m_Trade.ResultCode() doesn't exist here but m_trade.ResultRetcodeDescription() returns "invaid fill" .

Help please :)

 
seemore:

Hi, thank you for you reply.

m_Trade.ResultCode() doesn't exist here but m_trade.ResultRetcodeDescription() returns "invaid fill" .

Help please :)

Yes it was ResultRetcode() sorry.

Invalid fill is 10030. Search for 10030 in documentation and forum.

Reason: