Discussion of article "Trade Events in MetaTrader 5" - page 2

 
Rosh:
The article says that the initial check is performed in the terminal. OrderCheck() also works in the terminal, nothing is sent to the server.
Here's another one: "invalid request does not pass the initial check on the server side".
 
Yedelkin:

The article says: "once the request is sent, it arrives at the server and undergoes initial validation".

It literally says the following:

Important: each request is pre-checked for correctness in the client terminal itself before it is sent to the trading server. Plausibly incorrect requests (buy a million lots or buy at a negative price) do not pass outside the terminal. This is done to protect trading servers from mass incorrect requests in case of an error in the mql5-programme.

After sending a request, it arrives at the trade server and passes the initial check:

 
Rosh:
You confused me, too. Removed the reference from the "initial check" combination.
:) I'm just re-reading the article. I apologise if something is wrong. But I have already given two links directly from the article about the initial server-side check.
 
Yedelkin:
So you are saying that the OrderSend() function returns true only after the server accepts (places) the order?
It means that the request is accepted. Further it can be rejected by the dealer, trading platform and so on.
 
Rosh:

It says literally the following:

Important: each request is pre-checked for correctness in the client terminal itself before it is sent to the trading server. Plausibly incorrect requests (buy a million lots or buy at a negative price) do not pass outside the terminal. This is done to protect trade servers from mass incorrect requests in case of an error in the mql5-program.

After sending a request, it arrives at the trade server and passes the initial check:

Then it is necessary to divide it into three checks:

1) rough check by the terminal;

2) check on the terminal side using the OrderCheck()$ function

3) server-side check.

It is still unclear what the concept of "primary check" refers to.

 

Rosh:
Это означает, что запрос принят. Дальше он может быть отвергнут дилером, торговой площадкой и так далее.

OK. I don't care about the further fate of the order. From your words I conclude (question 2) that the OrderSend() function cannot return true immediately after checking the request for correctness. true is returned only after the server accepts the order. Is this correct? Then it turns out that the information that "in case of a successful basic structure check, true is returned" is not quite correct in the reference book.
 
Yedelkin:
OK. I don't care about the further fate of the order. From your words I conclude (question 2) that the OrderSend() function cannot return true immediately after checking the request for correctness. true is returned only after the server accepts the order. Is this correct? Then it turns out that the information that "in case of a successful basic check of structures, true is returned" is not quite correct in the reference book.
Basic check ≡ Primary check on the server side
 
Rosh:
Basic check ≡ Primary server-side check

I have already written above when formulating question 2 that "there may be situations when a request has already been checked for correctness but has not yet been accepted by the broker". Nobody seems to argue with this statement. That's why I'll rephrase question 2 a bit taking into account your definitions:

at what exact moment does the OrderSend() function return true - immediately after the basic check (initial check on the server side) of the request for correctness or only after the order is accepted by the server?

In fact, I am interested in the following question: what exactly stage (from the terminal to the server) does the OrderSend() function signal true when the order has passed through? "Basic check" or "Basic check + acceptance (placement) of the order"? Or is it impossible to make the necessary conclusion solely on receipt of true ?

 
Yedelkin:

I have already written above when formulating question 2 that "there may be situations when a request has already been checked for correctness but has not yet been accepted by the broker". Nobody seems to argue with this statement. Therefore, I will rephrase question 2 a bit taking into account your definitions:

at what exact moment does the OrderSend() function return true - immediately after the basic check (primary check on the server side) of the request for correctness or only after the order is accepted by the server?

Of course, after the server accepts it - it's obvious. Besides, the function is called OrderSEND.
 
Yedelkin:

In fact, I'm interested in the following question: which stage (from the terminal to the server) of the OrderSend() function is signalled by true ? "Basic check" or "Basic check + acceptance (placement) of the order"? Or is it impossible to draw the necessary conclusion solely on the receipt of true ?
In my opinion, you should not draw conclusions based on true only, you should analyse the server response code as well (and the latter is a higher priority, as it seems to me)...