Error 4753 : Position not found on OrderSend request

 

Hey Guys,

I got a strange MQL error on execution : Error 4753 for a Position not found issue.

This error didn t append on all my order request, sometime execution is fine and sometime this error append. 

I have already google it and the general solution reported for this issue is to use PositionSelect function.

But in my case this error append during my opening order (LONG or SHORT). So execute a PositionSelect on a position who didn t exist is a bit strange no ? I have try to call this function to fix my issue but didn't work.

In attached files you can find my main file (test.mq5) my master class (Trader.mqh), my money class (Money.mqh) and finaly the position execution class (Positions.mqh)  where error append (reported at line 86 for LONG and line 126 for SHORT).

Thank's for your support ;) 

Documentation on MQL5: Trade Functions / PositionSelect
Documentation on MQL5: Trade Functions / PositionSelect
  • www.mql5.com
Trade Functions / PositionSelect - Documentation on MQL5
Files:
Trader.mqh  4 kb
Positions.mqh  9 kb
Money.mqh  4 kb
test.mq5  3 kb
 
wizmoisa:

Hey Guys,

I got a strange MQL error on execution : Error 4753 for a Position not found issue.

This error didn t append on all my order request, sometime execution is fine and sometime this error append. 

I have already google it and the general solution reported for this issue is to use PositionSelect function.

But in my case this error append during my opening order (LONG or SHORT). So execute a PositionSelect on a position who didn t exist is a bit strange no ? I have try to call this function to fix my issue but didn't work.

In attached files you can find my main file (test.mq5) my master class (Trader.mqh), my money class (Money.mqh) and finaly the position execution class (Positions.mqh)  where error append (reported at line 86 for LONG and line 126 for SHORT).

Thank's for your support ;) 

Sorry for late reply, I was on vacation when you posted. And I found your post now as someone else report this error 4753.

Unfortunately your test EA can't be compiled as you don't provide "WizGator.mqh".

Reason: