# NOT RUN {
library(lazytrade)
dir <- normalizePath(tempdir(),winslash = "/")
# test file to launch MT4 terminal with parameters
write_ini_file(mt4_Profile = "Default",
mt4_Login = "12345678",
mt4_Password = "password",
mt4_Server = "BrokerServerName",
dss_inifilepath = dir,
dss_inifilename = "prod_T1.ini",
dss_mode = "prod")
# test file to launch robot backtest
TO <- format(as.Date(Sys.Date()), "%Y.%m.%d")
FROM <- format(as.Date(Sys.Date()-60), "%Y.%m.%d")
# test file for MT4 use for backtesting
write_ini_file(mt4_Profile = "Default",
mt4_Login = "12345678",
mt4_Password = "password",
mt4_Server = "BrokerServerName",
mt4_TestExpert="FALCON_D\\Falcon_D",
mt4_TestExpertParameters="Falcon_D.set",
mt4_TestSymbol="EURUSD",
mt4_TestPeriod="H1",
mt4_TestModel="2",
mt4_TestSpread="20",
mt4_TestOptimization="false",
mt4_TestDateEnable="true",
mt4_TestFromDate=FROM,
mt4_TestToDate=TO,
mt4_TestReport="EURUSD_Report",
mt4_TestReplaceReport="false",
mt4_TestShutdownTerminal="true",
mt4_TestVisualEnable="false",
dss_inifilepath = dir,
dss_inifilename = "backtest.ini",
dss_mode = "backtest")
# }
Run the code above in your browser using DataLab