Closed silverbirder closed 5 years ago
$ docker run ea31337/ea-tester run_backtest -e MACD -v
Checking platform...
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
Installed Terminal: 4.0.0.1010
Installed MetaEditor: 5.0.0.1804
Copying ini files...
'/opt/conf/mt4-tester.ini' -> '/home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/config/mt4-tester.ini'
'/opt/conf/terminal.ini' -> '/home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/config/terminal.ini'
Locating TestExpert file (MACD => MACD Sample.mq4)...
Setting '^TestExpert' to 'MACD Sample' in mt4-tester.ini
Getting 'TestFromDate' from mt4-tester.ini: 2017.01.01
Getting 'TestToDate' from mt4-tester.ini: 2017.01.31
Getting 'TestSymbol' from mt4-tester.ini: EURUSD
Getting '^TestExpert' from mt4-tester.ini: MACD Sample
Getting '^Expert' from mt4-tester.ini:
Getting '^Script' from mt4-tester.ini:
Getting 'Server' from mt4-tester.ini: default
Getting 'Server' from mt4-tester.ini: default
Configuring test report (tester/MACD Sample-Report)...
Setting '^TestReport' to 'tester/MACD Sample-Report' in mt4-tester.ini
Checking destination directory (/opt/results)...
mkdir: created directory '/opt/results'
Getting '^TestPeriod' from mt4-tester.ini: M30
Checking backtest data (DS)...
Getting 'bt_data' from custom.ini:
Loading /opt/scripts/get_bt_data.sh...
Loading /opt/scripts/get_bt_data.sh...
mkdir: created directory '/home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/history/downloads/EURUSD-2017-DS'
Setting write permissions for backtest files...
Cleaning backtest data for ...
Value 'bt_data' does not exist, ignoring.
Getting data...
Downloading...
/opt/scripts/get_bt_data.sh done.
3021591 1148868 -rw-r--r-- 1 ubuntu root 1176435960 Jan 11 2018 ./tester/history/EURUSD30_0.fxt
3021597 20952 -rw-r--r-- 1 ubuntu root 21451768 Jan 10 2018 ./history/default/EURUSD1.hst
3021600 68 -rw-r--r-- 1 ubuntu root 65608 Jan 10 2018 ./history/default/EURUSD360.hst
3021594 5244 -rw-r--r-- 1 ubuntu root 5367928 Jan 10 2018 ./history/default/EURUSD4.hst
3021596 4196 -rw-r--r-- 1 ubuntu root 4294528 Jan 10 2018 ./history/default/EURUSD5.hst
3021592 1400 -rw-r--r-- 1 ubuntu root 1431628 Jan 10 2018 ./history/default/EURUSD15.hst
3021601 10484 -rw-r--r-- 1 ubuntu root 10734088 Jan 10 2018 ./history/default/EURUSD2.hst
3021606 96 -rw-r--r-- 1 ubuntu root 96688 Jan 10 2018 ./history/default/EURUSD240.hst
3020485 352 -rw-r--r-- 1 ubuntu root 358048 Jan 10 2018 ./history/default/EURUSD60.hst
3021609 700 -rw-r--r-- 1 ubuntu root 715888 Jan 10 2018 ./history/default/EURUSD30.hst
3021602 1748 -rw-r--r-- 1 ubuntu root 1789528 Jan 10 2018 ./history/default/EURUSD12.hst
3021599 188 -rw-r--r-- 1 ubuntu root 188968 Jan 10 2018 ./history/default/EURUSD120.hst
3021607 3496 -rw-r--r-- 1 ubuntu root 3578848 Jan 10 2018 ./history/default/EURUSD6.hst
3021588 20 -rw-r--r-- 1 ubuntu root 18868 Jan 10 2018 ./history/default/EURUSD1440.hst
3021598 2100 -rw-r--r-- 1 ubuntu root 2147368 Jan 10 2018 ./history/default/EURUSD10.hst
3021610 124 -rw-r--r-- 1 ubuntu root 125788 Jan 10 2018 ./history/default/EURUSD180.hst
3021608 36 -rw-r--r-- 1 ubuntu root 34468 Jan 10 2018 ./history/default/EURUSD720.hst
3021603 6992 -rw-r--r-- 1 ubuntu root 7157128 Jan 10 2018 ./history/default/EURUSD3.hst
3021595 4 -rw-r--r-- 1 ubuntu root 3328 Jan 10 2018 ./history/default/EURUSD10080.hst
3021593 4 -rw-r--r-- 1 ubuntu root 928 Jan 10 2018 ./history/default/EURUSD43200.hst
3021604 1052 -rw-r--r-- 1 ubuntu root 1073788 Jan 10 2018 ./history/default/EURUSD20.hst
3021605 52 -rw-r--r-- 1 ubuntu root 50008 Jan 10 2018 ./history/default/EURUSD480.hst
Cleaning previous test data...
Starting...
0 13:08:17.213 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Libraries/stdlib.mq4 updated
0 13:08:17.216 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSample.cpp updated
0 13:08:17.218 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSample.def updated
0 13:08:17.220 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSample.vcxproj updated
0 13:08:17.222 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSampleTester.mq4 updated
0 13:08:17.244 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/Libraries/DLLSample.dll updated
0 13:08:17.247 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/Pipes/PipeClient.mq4 updated
0 13:08:17.252 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/Pipes/PipeClientPure.mq4 updated
0 13:08:17.255 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/PeriodConverter.mq4 updated
0 13:08:17.255 LiveUpdate: update C:\Program Files\MetaTrader 4\MQL4 folder finished
0 13:08:17.357 MetaTrader 4 build 1010 started (MetaQuotes Software Corp.)
0 13:08:17.358 Microsoft Windows 7 (x64 based PC), IE 11.00, 2 x Intel Pentium 4 2.40GHz, RAM: 1641 / 1998 Mb, HDD: 46311 / 59819 Mb, GMT+00:00
0 13:08:17.358 Data Folder: C:\Program Files\MetaTrader 4
0 13:08:17.864 Sources recompilation started
0 13:08:30.431 Sources recompilation finished (28 compiled in 12589 msec)
0 13:08:30.460 Started with configuration file 'config/mt4-tester.ini'
0 13:08:20.295 Compiling 'Parabolic'
0 13:08:20.296 Compiling 'RSI'
0 13:08:20.296 Compiling 'Stochastic'
0 13:08:20.296 Compiling 'ZigZag'
0 13:08:20.296 Compiling 'SimplePanel'
0 13:08:25.686 Compiling 'PeriodConverter'
0 13:08:25.686 Compiling 'DLLSampleTester'
0 13:08:25.687 Compiling 'PipeClient'
0 13:08:25.687 Compiling 'PipeClientPure'
0 13:08:28.363 Compiling 'stdlib'
Checking logs...
/home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/MQL4/Logs/20181108.log
/home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/tester/logs/20181108.log
/home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/logs/20181108.log
/home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/logs/metaeditor.log
/home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/logs/metaeditor_prev.log
==> /home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/MQL4/Logs/20181108.log <==
0 13:08:20.295 Compiling 'Bears'
0 13:08:20.295 Compiling 'Bulls'
0 13:08:20.295 Compiling 'CCI'
0 13:08:20.295 Compiling 'Custom Moving Averages'
0 13:08:20.295 Compiling 'Heiken Ashi'
0 13:08:20.295 Compiling 'Ichimoku'
0 13:08:20.295 Compiling 'iExposure'
0 13:08:20.295 Compiling 'MACD'
0 13:08:20.295 Compiling 'Momentum'
0 13:08:20.295 Compiling 'OsMA'
0 13:08:20.295 Compiling 'Parabolic'
0 13:08:20.296 Compiling 'RSI'
0 13:08:20.296 Compiling 'Stochastic'
0 13:08:20.296 Compiling 'ZigZag'
0 13:08:20.296 Compiling 'SimplePanel'
0 13:08:25.686 Compiling 'PeriodConverter'
0 13:08:25.686 Compiling 'DLLSampleTester'
0 13:08:25.687 Compiling 'PipeClient'
0 13:08:25.687 Compiling 'PipeClientPure'
0 13:08:28.363 Compiling 'stdlib'
==> /home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/tester/logs/20181108.log <==
2 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: modify #44 buy 0.10 EURUSD at 1.06904 sl: 1.06910 tp: 1.06954 ok
2 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: modify #44 buy 0.10 EURUSD at 1.06904 sl: 1.06911 tp: 1.06954 ok
2 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: modify #44 buy 0.10 EURUSD at 1.06904 sl: 1.06912 tp: 1.06954 ok
2 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: modify #44 buy 0.10 EURUSD at 1.06904 sl: 1.06913 tp: 1.06954 ok
3 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: OrderModify error 1
0 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: OrderModify error 1
3 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: OrderModify error 1
0 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: OrderModify error 1
3 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: OrderModify error 1
0 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: OrderModify error 1
3 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: OrderModify error 1
0 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: OrderModify error 1
2 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: modify #44 buy 0.10 EURUSD at 1.06904 sl: 1.06914 tp: 1.06954 ok
2 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: modify #44 buy 0.10 EURUSD at 1.06904 sl: 1.06915 tp: 1.06954 ok
2 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: modify #44 buy 0.10 EURUSD at 1.06904 sl: 1.06916 tp: 1.06954 ok
2 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: modify #44 buy 0.10 EURUSD at 1.06904 sl: 1.06917 tp: 1.06954 ok
2 13:08:55 2017.01.30 16:01 MACD Sample EURUSD,M30: modify #44 buy 0.10 EURUSD at 1.06904 sl: 1.06918 tp: 1.06954 ok
0 13:08:55 2017.01.30 16:03 Tester: stop loss #44 at 1.06918 (1.06918 / 1.06928)
0 13:08:55.489 EURUSD,M30: 7374409 tick events (970 bars, 7374509 bar states) processed in 0:00:07.961 (total time 0:00:20.509)
0 13:08:58.284 Expert MACD Sample EURUSD,M30: removed
==> /home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/logs/20181108.log <==
0 13:08:17.203 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Indicators/ZigZag.mq4 updated
0 13:08:17.213 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Libraries/stdlib.mq4 updated
0 13:08:17.216 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSample.cpp updated
0 13:08:17.218 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSample.def updated
0 13:08:17.220 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSample.vcxproj updated
0 13:08:17.222 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSampleTester.mq4 updated
0 13:08:17.244 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/Libraries/DLLSample.dll updated
0 13:08:17.247 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/Pipes/PipeClient.mq4 updated
0 13:08:17.252 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/Pipes/PipeClientPure.mq4 updated
0 13:08:17.255 LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/PeriodConverter.mq4 updated
0 13:08:17.255 LiveUpdate: update C:\Program Files\MetaTrader 4\MQL4 folder finished
0 13:08:17.357 MetaTrader 4 build 1010 started (MetaQuotes Software Corp.)
0 13:08:17.358 Microsoft Windows 7 (x64 based PC), IE 11.00, 2 x Intel Pentium 4 2.40GHz, RAM: 1641 / 1998 Mb, HDD: 46311 / 59819 Mb, GMT+00:00
0 13:08:17.358 Data Folder: C:\Program Files\MetaTrader 4
0 13:08:17.864 Sources recompilation started
0 13:08:30.431 Sources recompilation finished (28 compiled in 12589 msec)
0 13:08:30.460 Started with configuration file 'config/mt4-tester.ini'
1 13:08:35.165 '1809640': connect failed [No connection]
1 13:08:58.611 MQL5.community: authorization failed
0 13:08:58.629 MetaTrader 4 build 1010 stopped
==> /home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/logs/metaeditor.log <==
��
==> /home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/logs/metaeditor_prev.log <==
��TEST succeeded.
Getting 'TestReport' from mt4-tester.ini: tester/MACD Sample-Report
0m0.010s 0m0.020s
0m15.520s 0m10.120s
/opt/scripts/run_backtest.sh done
Exiting /opt/scripts/run_backtest.sh with 0
connect failed [No connection]
This is the notice and it's expected during backtesting. When you're backtesting, you're not expected to connect to your broker account.
If you do, there is a risk that broker tick data is mixed with existing downloaded FXT which can cause the data errors.
So the best is to not edit mt4-tester.ini
(leave it as it is) and run the backtest in off-line mode, so it's consistent.
So please keep the settings which are by default set to:
Login=1809640
Password=xxx
Server=default
If you're trying to run EA on your broker account using scripts, it's a different story and there are different scripts for this.
In summary, the backtest which you're running is running as expected, as you could see orders being open and modified. The 'OrderModify error 1' errors are bugs in MACD sample EA it-self.
I see. thank you.
I misunderstood that it is not working due to an error. I found a back test report.
I took the following steps.
connect failed [No connection]
... What is the cause??I opened a demo account using MetaTrader 4 on my local PC. I entered login & password & server made at that time.
Please help me !