In my EA I store an array of tickets I get using OrderSend.
Later in the code I try to access the order with OrderSelect and the following code :
if (OrderSelect(ids.At(i), SELECT_BY_TICKET)) {
if (OrderMagicNumber() == OrderMagic) {
// Do something here
}
}
In most cases this appears to work but somehow at some point during the execution I receive another order with completely different values that the one that are expected (price, symbol, TP and SL are different).
I can't understand why this happens so I was wondering if there is some kind of logical explanation behind this.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Good afternoon,
In my EA I store an array of tickets I get using OrderSend.
Later in the code I try to access the order with OrderSelect and the following code :
In most cases this appears to work but somehow at some point during the execution I receive another order with completely different values that the one that are expected (price, symbol, TP and SL are different).
I can't understand why this happens so I was wondering if there is some kind of logical explanation behind this.