EA31337 / EA-Tester

🐳📈 Headless Forex backtesting for MetaTrader platform using Docker
https://ea31337.github.io/EA-Tester
MIT License
109 stars 84 forks source link

run_backtest.sh connect failed [No connection] #135

Closed silverbirder closed 5 years ago

silverbirder commented 5 years ago

I took the following steps.

$ docker pull ea31337/ea-tester
$ docker run -it ea31337/ea-tester /bin/bash

ubuntu@8a7a2579206f:/opt/scripts$ vi /opt/conf/mt4-tester.ini
# edit Login, Password, Server (MetaQuotes-demo)

ubuntu@8a7a2579206f: mkdir "/home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/history/MetaQuotes-demo/"
ubuntu@8a7a2579206f:/opt/scripts$ run_backtest.sh -v -t -e MACD -c USD -p EURUSD -d 2000 -m 1-2 -y 2017 -s 20 -b DS -r Report -O "_optimization_results"
Checking platform...
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
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
Configuring start test period (2017.1.01)...
Setting '^TestFromDate' to '2017.1.01' in mt4-tester.ini
Configuring end test period (2017.2.31)...
Setting '^TestToDate' to '2017.2.31' in mt4-tester.ini
Configuring symbol pair (EURUSD)...
Setting '^TestSymbol' to 'EURUSD' in mt4-tester.ini
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: MetaQuotes-demo
Getting 'Server' from mt4-tester.ini: MetaQuotes-demo
Configuring base currency (USD)...
Configuring deposit (2000)...
Configuring test report (tester/Report)...
Setting '^TestReport' to 'tester/Report' in mt4-tester.ini
Checking destination directory (_optimization_results)...
Getting '^TestPeriod' from mt4-tester.ini: M30
Checking backtest data (DS)...
Getting 'bt_data' from custom.ini: EURUSD-2017-DS
Cleaning previous test data...
/home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/tester/Report.htm
/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/logs/terminal.log.txt
/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/tester/Report.gif
/home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/history/MetaQuotes-demo/symbols.sel
Starting...
0   12:13:15.633    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Libraries/stdlib.mq4 updated
0   12:13:15.634    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSample.cpp updated
0   12:13:15.634    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSample.def updated
0   12:13:15.635    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSample.vcxproj updated
0   12:13:15.635    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSampleTester.mq4 updated
0   12:13:15.636    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/Libraries/DLLSample.dll updated
0   12:13:15.637    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/Pipes/PipeClient.mq4 updated
0   12:13:15.638    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/Pipes/PipeClientPure.mq4 updated
0   12:13:15.638    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/PeriodConverter.mq4 updated
0   12:13:15.638    LiveUpdate: update C:\Program Files\MetaTrader 4\MQL4 folder finished
0   12:13:15.694    MetaTrader 4 build 1010 started (MetaQuotes Software Corp.)
0   12:13:15.696    Microsoft Windows 7 (x64 based PC), IE 11.00, 2 x Intel Pentium 4  2.40GHz, RAM: 1635 / 1998 Mb, HDD: 47619 / 59819 Mb, GMT+00:00
0   12:13:15.696    Data Folder: C:\Program Files\MetaTrader 4
0   12:13:16.000    Sources recompilation started
0   12:13:27.876    Sources recompilation finished (28 compiled in 11877 msec)
0   12:13:27.877    Started with configuration file 'config/mt4-tester.ini'
0   12:13:18.214    Compiling 'Parabolic'
0   12:13:18.214    Compiling 'RSI'
0   12:13:18.214    Compiling 'Stochastic'
0   12:13:18.214    Compiling 'ZigZag'
0   12:13:18.215    Compiling 'SimplePanel'
0   12:13:23.405    Compiling 'PeriodConverter'
0   12:13:23.406    Compiling 'DLLSampleTester'
0   12:13:23.406    Compiling 'PipeClient'
0   12:13:23.406    Compiling 'PipeClientPure'
0   12:13:25.892    Compiling 'stdlib'

==> /home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/tester/logs/20181108.log <==
2   12:14:27    2017.02.27 07:54  MACD Sample EURUSD,M30: modify #71 buy 0.10 EURUSD at 1.05722 sl: 1.05737 tp: 1.05772 ok
3   12:14:27    2017.02.27 07:54  MACD Sample EURUSD,M30: OrderModify error 1
0   12:14:27    2017.02.27 07:54  MACD Sample EURUSD,M30: OrderModify error 1
2   12:14:27    2017.02.27 07:54  MACD Sample EURUSD,M30: modify #71 buy 0.10 EURUSD at 1.05722 sl: 1.05741 tp: 1.05772 ok
2   12:14:27    2017.02.27 07:54  Tester: take profit #71 at 1.05772 (1.05775 / 1.05785)
2   12:14:27    2017.02.27 18:30  MACD Sample EURUSD,M30: open #72 sell 0.10 EURUSD at 1.05937 tp: 1.05887 ok
0   12:14:27    2017.02.27 18:30  MACD Sample EURUSD,M30: SELL order opened : 1.0594
2   12:14:27    2017.02.27 18:57  MACD Sample EURUSD,M30: modify #72 sell 0.10 EURUSD at 1.05937 sl: 1.05936 tp: 1.05887 ok
3   12:14:27    2017.02.27 18:57  MACD Sample EURUSD,M30: OrderModify error 1
0   12:14:27    2017.02.27 18:57  MACD Sample EURUSD,M30: OrderModify error 1
2   12:14:27    2017.02.27 18:57  MACD Sample EURUSD,M30: modify #72 sell 0.10 EURUSD at 1.05937 sl: 1.05935 tp: 1.05887 ok
2   12:14:27    2017.02.27 18:57  MACD Sample EURUSD,M30: modify #72 sell 0.10 EURUSD at 1.05937 sl: 1.05934 tp: 1.05887 ok
2   12:14:27    2017.02.27 18:57  MACD Sample EURUSD,M30: modify #72 sell 0.10 EURUSD at 1.05937 sl: 1.05933 tp: 1.05887 ok
2   12:14:27    2017.02.27 18:57  MACD Sample EURUSD,M30: modify #72 sell 0.10 EURUSD at 1.05937 sl: 1.05932 tp: 1.05887 ok
2   12:14:27    2017.02.27 18:57  MACD Sample EURUSD,M30: modify #72 sell 0.10 EURUSD at 1.05937 sl: 1.05931 tp: 1.05887 ok
2   12:14:27    2017.02.27 18:57  MACD Sample EURUSD,M30: modify #72 sell 0.10 EURUSD at 1.05937 sl: 1.05930 tp: 1.05887 ok
2   12:14:27    2017.02.27 18:57  MACD Sample EURUSD,M30: modify #72 sell 0.10 EURUSD at 1.05937 sl: 1.05929 tp: 1.05887 ok
0   12:14:27    2017.02.27 19:00  Tester: stop loss #72 at 1.05929 (1.05919 / 1.05929)
0   12:14:27.902    EURUSD,M30: 15060991 tick events (1890 bars, 15061091 bar states) processed in 0:00:15.532 (total time 0:00:40.846)
0   12:14:31.227    Expert MACD Sample EURUSD,M30: removed

==> /home/ubuntu/.wine/drive_c/Program Files/MetaTrader 4/logs/20181108.log <==
0   12:13:15.632    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Indicators/Stochastic.mq4 updated
0   12:13:15.632    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Indicators/ZigZag.mq4 updated
0   12:13:15.633    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Libraries/stdlib.mq4 updated
0   12:13:15.634    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSample.cpp updated
0   12:13:15.634    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSample.def updated
0   12:13:15.635    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSample.vcxproj updated
0   12:13:15.635    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/DLLSampleTester.mq4 updated
0   12:13:15.636    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/DLL/Libraries/DLLSample.dll updated
0   12:13:15.637    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/Pipes/PipeClient.mq4 updated
0   12:13:15.638    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/Examples/Pipes/PipeClientPure.mq4 updated
0   12:13:15.638    LiveUpdate: C:\Program Files\MetaTrader 4\MQL4/Scripts/PeriodConverter.mq4 updated
0   12:13:15.638    LiveUpdate: update C:\Program Files\MetaTrader 4\MQL4 folder finished
0   12:13:15.694    MetaTrader 4 build 1010 started (MetaQuotes Software Corp.)
0   12:13:15.696    Microsoft Windows 7 (x64 based PC), IE 11.00, 2 x Intel Pentium 4  2.40GHz, RAM: 1635 / 1998 Mb, HDD: 47619 / 59819 Mb, GMT+00:00
0   12:13:15.696    Data Folder: C:\Program Files\MetaTrader 4
0   12:13:16.000    Sources recompilation started
0   12:13:27.876    Sources recompilation finished (28 compiled in 11877 msec)
0   12:13:27.877    Started with configuration file 'config/mt4-tester.ini'
1   12:13:47.073    '39747114': connect failed [No connection]
0   12:14:31.234    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/Report
0m0.040s 0m0.000s
0m23.790s 0m16.240s
/opt/scripts/run_backtest.sh done
Exiting /opt/scripts/run_backtest.sh with 0
1   12:13:47.073    '****': connect failed [No connection]
0   12:14:31.234    MetaTrader 4 build 1010 stopped

ubuntu@8a7a2579206f:/opt/scripts$

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 !

silverbirder commented 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
kenorb commented 5 years ago

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.

silverbirder commented 5 years ago

I see. thank you.

I misunderstood that it is not working due to an error. I found a back test report.