Libraries: MultiTester - page 34 1...272829303132333435363738394041...59 New comment Yuriy Bykov 2024.01.21 17:07 #331 Hi, @Stefan Marjoram You can add this draft function for reading settings from file to string array. #define ARRAY_APPEND(array, value) \ ArrayResize(array, ArraySize(array) + 1, 128); \ array[ArraySize(array) - 1] = value; //+------------------------------------------------------------------+ //|| //+------------------------------------------------------------------+ void LoadSettings(string filename, string &settings[]) { int f = FileOpen(filename, FILE_READ | FILE_TXT | FILE_ANSI); if(f) { string setting = ""; string s; while(!FileIsEnding(f)) { s = FileReadString(f); StringTrimRight(s); StringTrimLeft(s); if(s == "[Tester]") { if(setting != "") { ARRAY_APPEND(settings, setting); setting = ""; } } if(s != "" && StringSubstr(s, 0, 2) != "//") { setting += s + "\n"; } } if(setting != "") { ARRAY_APPEND(settings, setting); } FileClose(f); } else { PrintFormat("Error open file: %s", filename); } } #undef ARRAY_APPEND And use it in OnInit() like this int OnInit() { string Settings[]; LoadSettings("MySettings.ini", Settings); /* For check reading for(int i = 0; i < ArraySize(Settings); i++) { PrintFormat("------------ Settings[%d]: --------------", i); Print(Settings[i]); } */ for (uint i = ArraySize(Settings); (bool)i--;) Run(Settings[i]); return INIT_SUCCEEDED; } fxsaber 2024.01.22 11:01 #332 Stefan Marjoram #:I need to add 20 set files Forum on trading, automated trading systems and testing trading strategies New version of MetaTrader 5 build 3550: improvements and fixes fxsaber, 2023.05.23 00:58 Validate is able to run many ini orders sequentially Put necessary ini-files into Files\YourName folder. Start Validate in Terminal, where you specify the folder name - YourName. The ini-tasks will be launched sequentially. Create 20 required ini-files and do as described above. Multiple full-automated Backtests (Multi-Currency Discussion of article "How How to start with EgorKim 2024.01.25 11:20 #333 I'm getting allergy attacks in the middle of nowhere. What could be the cause? fxsaber 2024.01.25 11:25 #334 EgorKim #: It's an allergy in the middle of nowhere. What could be the cause? Is the Start button pressed by hand? EgorKim 2024.01.25 12:36 #335 fxsaber #: Is the Start button hand-operated? Yes. I only use this code if(MTTESTER::IsReady()) { Sleep(200); } if(MTTESTER::ClickStart()) { Sleep(200); } fxsaber 2024.01.27 14:01 #336 EgorKim #:I only use this code Updated. fxsaber 2024.01.29 09:53 #337 MTTester has been updated. fxsaber 2024.01.29 20:48 #338 fxsaber #: MTTester has been updated. Again. fxsaber 2024.01.30 09:51 #339 MTTester.mqh updated. fxsaber 2024.01.31 22:35 #340 EgorKim #: It's an allergy in the middle of nowhere. Thank you for your help in testing! Updated MTTester.mqh posted. 1...272829303132333435363738394041...59 New comment
Hi, @Stefan Marjoram
You can add this draft function for reading settings from file to string array.
And use it in OnInit() like this
I need to add 20 set files
Forum on trading, automated trading systems and testing trading strategies
New version of MetaTrader 5 build 3550: improvements and fixes
fxsaber, 2023.05.23 00:58
Validate is able to run many ini orders sequentially
Create 20 required ini-files and do as described above.
I'm getting allergy attacks in the middle of nowhere.
What could be the cause?
It's an allergy in the middle of nowhere.
What could be the cause?
Is the Start button pressed by hand?
Is the Start button hand-operated?
Yes.
I only use this code
I only use this code
Updated.
MTTester has been updated.
Again.
It's an allergy in the middle of nowhere.
Thank you for your help in testing! Updated MTTester.mqh posted.