Obviously when the test run ended, there was still a pending order open, which the tester then closed. There is nothing suspicious or wrong about that. That is normal.
If however, your test is ending before the expected date, then either you have set a premature end-date, or your EA is forcefully terminating the test from within the code itself, or there is corrupt data.
Obviously when the test run ended, there was still a pending order open, which the tester then closed. There is nothing suspicious or wrong about that. That is normal.
If however, your test is ending before the expect ed date, then either you have set a premature end-date, or your EA is forcefully terminating the test from within the code itself, or there is corrupt data.
Hi Fernando, thank you for your reply!
If I am setting an expiration date 15mins after the pending order is created, shouldnt the test continued? As above, I am setting the Expiration parameter on the order to 15mins after it was created, yet the script ends at 23:59:56. And the tick data is is just fine as it is displayed correctly, (see screenshot)
https://charts.mql5.com/34/156/ger40-m5-metaquotes-software-corp.png
Ok I found out myself. The issue was "type_time", which was not set to ORDER_TIME_SPECIFIED
Thank you again!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I am trying to backtest a strategy with a custom symbol, I have imported tick data from a date range and the data displays just fine in the chart.
The strategy involves simply placing an order at 8:30AM.
However there is a point where one pending order at 8:30AM on 2022.08.17 gets canceled (at 2022.08.23 23:59:56 ) and the test is abruptly ended, although there is more tick data and the date range on the Settings tab is set up to 2022.09.30, but the backtest simply stops.
I have also set an expiration of 15mins after the order so if the price is not reached it should simply keep going through the test, but still no good.Log Lines:
2022.10.19 13:17:14.059 Core 1 2022.08.17 08:30:00 ------------------------START PLACE ORDER-------------------------
2022.10.19 13:17:14.059 Core 1 2022.08.17 08:30:00 High: 13896.8 - Low: 13866.8
2022.10.19 13:17:14.059 Core 1 2022.08.17 08:30:00 Expiration: 2022.08.17 08:45:00
2022.10.19 13:17:14.059 Core 1 2022.08.17 08:30:00 buy stop 1 GER40 at 13899.8 sl: 13856.8 tp: 13936.8 (13879.3 / 13880.3 / 13879.3)
2022.10.19 13:17:14.059 Core 1 2022.08.17 08:30:00 ------------------------END PLACE ORDER-------------------------
2022.10.19 13:17:14.059 Core 1 2022.08.23 23:59:56 order canceled due end of test [#2 buy stop 1 GER40 at 13899.8]
2022.10.19 13:17:14.059 Core 1 final balance 10000.00 GBP
Code that places the long order:
Can anybody help me to figure out why the test stops abruptly?
Thank you again!