-
Notifications
You must be signed in to change notification settings - Fork 39
How to Use
Here are the syntax how to use the scripts.
$ mt_read -i EURUSD1.hst -t hst-header | grep symbol
symbol = EURUSD
$ mt_modify -i EURUSD1.hst -t hst-header -m symbol=XXXYYY
$ mt_read -i EURUSD1.hst -t hst-header | grep symbol
symbol = XXXYYY
$ mt_read -i EURUSD1_0.fxt -t fxt-header | grep ^testBeginDate
testBeginDate = 2018-01-01 22:00:00
$ mt_modify -i EURUSD1_0.fxt -t fxt-header -m "testBeginDate=2018-01-02 23:00:00"
$ mt_read -i EURUSD1_0.fxt -t fxt-header | grep ^testBeginDate
testBeginDate = 2018-01-02 23:00:00
$ mt_read -i EURUSD1_0.fxt -t fxt-header | grep pointSize
pointSize = 1e-05
$ mt_modify -i EURUSD1_0.fxt -t fxt-header -m pointSize=0.01
$ mt_read -i EURUSD1_0.fxt -t fxt-header | grep ^pointSize
pointSize = 0.01
$ /opt/scripts/py/mt_read.py -i EURUSD1.hcc -t hcc-header | grep name
name = History
$ /opt/scripts/py/mt_modify.py -i EURUSD1.hcc -t hcc-header -m name=Foo
$ /opt/scripts/py/mt_read.py -i EURUSD1.hcc -t hcc-header | grep name
name = Foo
$ mt_read -i FILE.srv -t srv | grep serverName
serverName = SomeValue
$ mt_modify -i FXCM-USDDemo01.srv -t srv -m serverName=Foo
ser
verName = Foo
% docker run -it ea31337/ea-tester bash
/opt/scripts$ source .funcs.cmds.inc.sh
$ cd ~/.wine/drive_c/MetaTrader*
$ find . -name "sym*"
./history/symbolsets
./history/default/symbols.raw
./history/symbols.raw
$ mt_read -f ./history/symbols.raw -t symbols-raw | grep ^name
... (these are group names, each pair-group have some settings) ...
name = EURAUD
name = EURCAD
name = EURCHF
name = EURGBP
name = EURJPY
name = EURNZD
name = EURUSD
...
$ mt_read -f ./history/symbols.raw -t symbols-raw | grep -A5 EURUSD
name = EURUSD
description = Euro vs US Dollar
altName =
baseCurrency = EUR
group = 0
digits = 4
$ mt_read -f ./history/symbols.raw -t symbols-raw | grep -A5 GBPUSD
name = GBPUSD
description = Great Britain Pound vs US Dollar
altName =
baseCurrency = GBP
group = 0
digits = 4
$ mt_modify -f ./history/symbols.raw -t symbols-raw -k EURUSD -m digits=5
$ mt_read -f ./history/symbols.raw -t symbols-raw | grep -A5 EURUSD
name = EURUSD
description = Euro vs US Dollar
altName =
baseCurrency = EUR
group = 0
digits = 5 // <-- We've just changed digits to 5 for EURUSD only.
Related: EA31337/EA-Tester#154