Download MetaTrader 5

TRADE_RETCODE_PLACED (Return Code: 10008) - Error or not?

To add comments, please log in or register
Find out how to add a video in the messages editor
Anton Nel
37076
Anton Nel 2013.08.07 18:28 

Is this Return Code: 10008 (TRADE_RETCODE_PLACED) Error or not? I understand 10008 shows that my order has been placed. I am not 100% sure if it is error or not? Please confirm with me. Thank you.

Laurentiu Octavian Niculescu
6690
Laurentiu Octavian Niculescu 2013.08.07 18:53  
ROMAN5:

Is this Return Code: 10008 (TRADE_RETCODE_PLACED) Error or not? I understand 10008 shows that my order has been placed. I am not 100% sure if it is error or not? Please confirm with me. Thank you.

I found this on the forum, maybe it's enough to clarify your doubts

Forum

"10008 - TRADE_RETCODE_PLACED" vs "10009 - TRADE_RETCODE_DONE"

phi.nuts, 2013.01.16 19:30

10008 is for OrderSendAsync.

This is language problem. For example, a boss tell his employee to do something and his employee reply "considered done", when the employee finish with what his boss was asked him to do, he tell his boss, "It's done, Sir"

In this case, "10009 - TRADE_RETCODE_DONE" means successful, that your request is completely done . There's also 10010 - TRADE_RECODE_DONE_PARTIAL, for example only half of the lot is opened, usually for IOC (Immediate Or Cancel) type of order (IOC- Investopedia)


Anton Nel
37076
Anton Nel 2013.08.07 18:59  
Hi launic - this is not enough.
Anton Nel
37076
Anton Nel 2013.08.07 19:01  
I guess 10008 is not an error. Correct me if I am wrong. Thanks.
Laurentiu Octavian Niculescu
6690
Laurentiu Octavian Niculescu 2013.08.07 20:58  
ROMAN5:
I guess 10008 is not an error. Correct me if I am wrong. Thanks.
Your guess is correct, 10008 is not an error it's a return code for a correctly placed "command".
Alain Verleyen
Moderator
30743
Alain Verleyen 2013.08.07 21:40  
ROMAN5:

Is this Return Code: 10008 (TRADE_RETCODE_PLACED) Error or not? I understand 10008 shows that my order has been placed. I am not 100% sure if it is error or not? Please confirm with me. Thank you.

You only have to read the documentation :

Returns true if the request is sent to a trade server. In case the request is not sent, it returns false. In case the request is sent, in the result variable the response code contains TRADE_RETCODE_PLACED value (code 10008) – "order placed". Successful execution means only the fact of sending, but does not give any guarantee that the request has reached the trade server and has been accepted for processing. When processing the received request, a trade server sends a reply to a client terminal notifying of change in the current state of positions, orders and deals, which leads to the generation of the Trade event.

This is obviously not an error, but that doesn't mean an error could not occur later.
Alain Verleyen
Moderator
30743
Alain Verleyen 2013.08.07 21:45  
launic:
Your guess is correct, 10008 is not an error it's a return code for a correctly placed "command".

Unfortunately, if we follow the documentation, that doesn't mean a correctly placed order, but a correctly sent order. The name of the code seems poorly chosen. It would have been better to use TRADE_RETCODE_SENDED.

Anton Nel
37076
Anton Nel 2013.08.07 22:10  
angevoyageur:

Unfortunately, if we follow the documentation, that doesn't mean a correctly placed order, but a correctly sent order. The name of the code seems poorly chosen. It would have been better to use TRADE_RETCODE_SENDED.

Thank you very much. Two thumbs up!!!
Laurentiu Octavian Niculescu
6690
Laurentiu Octavian Niculescu 2013.08.08 13:50  
angevoyageur:

Unfortunately, if we follow the documentation, that doesn't mean a correctly placed order, but a correctly sent order. The name of the code seems poorly chosen. It would have been better to use TRADE_RETCODE_SENDED.

Thanks for confirming, that is what I was trying say too, this is why I didn't use the word "order" but "command".
To add comments, please log in or register