Do you want to be a beta-tester ?
Last official release if 2940.
You reported a coding issue without posting any useful code.
Alain Verleyen:
Do you want to be a beta-tester ?
Last official release if 2940.
You reported a coding issue without posting any useful code.
Hi Alain,
Apologize for the delay. Updated my MT5 with latest beta and the error seems to be gone. Will continue testing and will update this thread if find any new problems. Thank you for the help.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I wrote a linear grid EA that generally works fine except on some testing scenarios. At some point in time, some orders will expire multiple times and others won't expire at all, and the status of the orders will still be like if they were open. See below for more details.
Does anyone knows how to solve this problem or if it is indeed a platform bug?
BUILD:
Using build 2962, although noticed the problem on 2960. Cannot tell if older versions have the same behavior.
DETAILS:
Testing from 2020.02.17 to 2021.06.01 on Brazilian ticker WIN$N, the EA works fine until 2020.11.24:
Until 2020.11.24, all orders expire at the end of each day, and the EA is able to get the updated state (ORDER_STATE_EXPIRED) from each order.
But on 2020.11.25 the problem happens:
The first strange behavior I noticed is that, although the number of orders to be expired match, order #2052 repeated 3 times, while others were not expired. Next, when trying to fetch the order #2049 information, it fails for both HistoryOrderSelect and OrderSelect. And although HistoryOrderSelect worked on order #2052, the state was still ORDER_STATE_PLACED. Next day, the orders start to expire normally again until the end of the testing.
Below are the details of the orders that failed:
I attached the list of deals that happened on the test. If I start the test on 2020.02.24, no error happens.
For completeness here is the snipped of code to create the buy/sell orders (for Buystop and SellLimit, the code is the same):