- Tester: Automated Optimization of a Trading Robot in Real Trading
- MetaTrader 4 Build 574 with Updated MQL4 Language and Market of Applications Released
- Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes
Why do you attempt to start the terminal again?
ShellExecuteA(0,"Open","terminal.exe",FileOptim,PathTester,3);
Why do you attempt to start the terminal again?
ShellExecuteA(0,"Open","terminal.exe",FileOptim,PathTester,3);
I am trying to start "terminal.exe" located in a different directory. Before the call of tester(...), the terminal was not running. After the call, the terminal is supposed to start to run with strategy tester launched. Thanks for your reply.
Why not WinExec() instead of ShellExecuteA() ?
Why not WinExec() instead of ShellExecuteA() ?
WinExec() does not work either. My OS is Windows server 2003 x64, I can launch the client terminal from a Matlab command: dos('testerdirectory\terminal.exe optimiser.ini'), but the strategy tester does not start. I have no clue ... ?
I modified it a bit. Launched it from Broco, and set the path to the Interbankfx. And it works.
//+------------------------------------------------------------------+ //| test_exec.mq4 | //| mailto:fxeconomist@yahoo.com | //+------------------------------------------------------------------+ #property link "mailto:fxeconomist@yahoo.com" #import "shell32.dll" int ShellExecuteA(int hwnd,string Operation,string File,string Parameters,string Directory,int ShowCmd); #import int Tester(string PathTester) { string FileOptim = "cash_4x_test.ini"; int start = ShellExecuteA(0,"Open","terminal.exe",FileOptim,PathTester,3); if( start<0){Print("Unable to start optimizer");return(0);} // Print("start value :", start); } int start() { string path = "D:\Trading Platforms\MetaTrader Platforms\Interbankfx"; int t=Tester(path); }
So it must be some other error.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use