Open missinglink opened 1 year ago
This comment seems to be helpful but I still wasn't able to get it to work.
note: requires xquartz
on MacOS.
Unrecognized option: host.docker.internal:0
use: X [:<display>] [option]
...
Fatal server error:
(EE) Unrecognized option: host.docker.internal:0
(EE)
31/01/2023 14:33:54 ***************************************
31/01/2023 14:33:54 *** XOpenDisplay failed (WAIThost.docker.internal:0)
*** x11vnc was unable to open the X DISPLAY: "WAIThost.docker.internal:0", it cannot continue.
The below errors are not so important, as I'm having them often, so they can be ignored and they shouldn't affect the run time in overall. I didn't look in too much details how to fix them.
0044:err:explorer:initialize_display_settings Failed to query current display settings for L"\\\\.\\DISPLAY1".
0098:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\wineusb": c0000142
00ec:err:d3d:wined3d_adapter_init Failed to initialise output, hr 0x80070057.
...
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
E.g. d3d
one complaining about missing Direct3D libraries (I think), ntoskrnl
about some driver, and .X11-unix
about permission. I think each error can be search for how to fix it from the Wine perspective (if you really want to fix them). We're running Windows application in a virtual frame-buffer within container on Linux, so it's not even on the regular desktop, especially it's not native Windows (where it was written), so that could be one of many reasons.
The test report consists of all zeros, which I'm assuming is incorrect?
You're running TestEnvelopes
script which is not doing any trading. It's written to test the indicator values which it prints correctly:
0 13:48:06.638 2019.01.04 00:00:00 TestEnvelopes EURUSD,M30: Testing values for Envelopes indicator...
0 13:48:06.638 2019.01.04 00:00:00 TestEnvelopes EURUSD,M30: Symbol : EURUSD
0 13:48:06.638 2019.01.04 00:00:00 TestEnvelopes EURUSD,M30: Current timeframe : 0
0 13:48:06.638 2019.01.04 00:00:00 TestEnvelopes EURUSD,M30: Bid/Ask : 1.139/1.14
0 13:48:06.639 2019.01.04 00:00:00 TestEnvelopes EURUSD,M30: Envelopes M1 : 1.13811/1.13925/1.14039 => CORRECT
0 13:48:06.639 2019.01.04 00:00:00 TestEnvelopes EURUSD,M30: Envelopes M5 : 1.13817/1.13931/1.14045 => CORRECT
0 13:48:06.639 2019.01.04 00:00:00 TestEnvelopes EURUSD,M30: Envelopes M15 : 1.13829/1.13943/1.14057 => CORRECT
0 13:48:06.639 2019.01.04 00:00:00 TestEnvelopes EURUSD,M30: Envelopes M30 : 1.13836/1.1395/1.14064 => CORRECT
0 13:48:08.717 2019.01.04 00:00:00 TestEnvelopes EURUSD,M30: Envelopes M60 : 1.13679/1.13793/1.13907 => CORRECT
0 13:48:08.717 2019.01.04 00:00:00 TestEnvelopes EURUSD,M30: Envelopes values are correct!
On success, it's returns exit code 0, on failure 1. This script is used for CI/CD to test for any regressions. So 0 trades is expected. Source code: https://github.com/EA31337/EA-Tester/blob/master/tests/TestEnvelopes.mq4
For run with MACD
, it's either you need to increase the period (maybe it's not trading too often), or the EA is broken. MACD is the default one which comes from the platform, they're very basic EAs and usually broken.
To increase number of months (by default only 1st month is run due to run being slow, so you can find about these errors before), use: -m 1-12
.
To test using EA31337 Advanced which should work better in terms of trading, try:
docker run ea31337/ea-tester run_backtest -y 2020 -m 1-12 -v -t -e https://github.com/EA31337/EA31337/releases/download/v2.011/EA31337-Advanced-v2.011.ex4
Note: 2021 year is also supported, 2022 needs to be yet released.
Or use EA31337 Libre, which is simpler EA, but still should trade fine:
-e https://github.com/EA31337/EA31337-Libre/releases/download/v1.011/EA31337-Libre-v1.011.ex4
Unrecognized option: host.docker.internal:0 use: X [:<display>] [option] ... Fatal server error: (EE) Unrecognized option: host.docker.internal:0 (EE) 31/01/2023 14:33:54 *************************************** 31/01/2023 14:33:54 *** XOpenDisplay failed (WAIThost.docker.internal:0) *** x11vnc was unable to open the X DISPLAY: "WAIThost.docker.internal:0", it cannot continue.
This error it's something to do with x11vnc
which is installed by default, so you can access the X11 screen. Probably x11vnc is using some syntax which doesn't work in in XQuartz.
To disable installation of x11vnc
package during provisioning, you can specify PROVISION_VNC=0
for provision.sh
.
To avoid VNC running during the backtest run, you need to make sure the process x11vnc
isn't running. Here is relevant code: https://github.com/EA31337/EA-Tester/blob/v1.0.4/scripts/.funcs.cmds.inc.sh#L280
If the x11vnc
process is found, it's running x11vnc
with some options. So if you stop the VNC service, the script should ignore it.
INFO: Compiling EA (MACD Sample.mq4)... ... (non-related Wine errors to ignore) ... INFO: Number of files compiled: 0
I've looked again into your issue at pastebin, and your main error is actually (wrongly printed as info, because it's just printing number of compiled files):
Number of files compiled: 0
If you look at the stack trace at your pastebin output, it's:
847 main /opt/scripts/run_backtest.sh
ERROR: Exiting /opt/scripts/run_backtest.sh with 1
Which points to this line: https://github.com/EA31337/EA-Tester/blob/v1.0.4/scripts/run_backtest.sh#L847
[ "${compiled_no}" -gt 0 ]
So that means, for some reason the provided file (MACD Sample.mq4
) couldn't be compiled properly. It's either due to white space (a less likely bug) or due to dependencies. MACD Sample is using some MQL libraries, and there is a chance they're not included properly, or maybe there are some compilation errors. Sometimes EA Tester have problems when source code file have complicated include dependencies pointing to different files. Unfortunately compilation errors aren't always shown on the screen, but they should be logged somewhere in the log file within the container (you can exec into running container and check manually via shell). The workaround to this is to provide already compiled file.
Useful tip: If you want to know exactly why the tester script failed, add -x
for tracing (it'll print you each shell command on the screen).
Heya,
I'm having trouble running the example command from the README:
The pertinent section of the logs seems to be:
Full output: https://pastebin.com/JdBxx2k1
I'm running this on a MacOS host using Docker Desktop.
Running the other example command
docker run ea-tester run_backtest -e TestEnvelopes -v
yeilds similar warnings related to the display:Full output: https://pastebin.com/QD0xskR6
The test report consists of all zeros, which I'm assuming is incorrect?
Any ideas how I might resolve these errors π ?