Download MetaTrader 5

error number if ticket is unknown (already closed)

To add comments, please log in or register
Carl Schreiber
Moderator
7954
Carl Schreiber  

Hi,

does anybody know what error number the mt4-server returns if an order already has been closed and an EA tries to close 'the ticket' as well?

MT5 does have:

10036

TRADE_RETCODE_POSITION_CLOSED

The position with the given POSITION_IDENTIFIER has already been closed


Mt4 does not know this kind of error - needless to say that a wish for the service desk will most probably cause a: we have no intention ...
whroeder1
17081
whroeder1  
I'd guess

9

ERR_MALFUNCTIONAL_TRADE

Malfunctional trade operation


Why don't you try it and find out?
Carl Schreiber
Moderator
7954
Carl Schreiber  
whroeder1:
I'd guess

9

ERR_MALFUNCTIONAL_TRADE

Malfunctional trade operation


Why don't you try it and find out?

Well I wasn't sure whether I'll get invalid ticket or e.g. off quotes or something else..

Anyway I wrote a script and got 4108:

4108

ERR_INVALID_TICKET

Invalid ticket


which is mentioned in the reference among all the other errors :(

To add comments, please log in or register