MQL5 Changes

 

Hi everyone.


I've been away for a couple of years. I had a Multi symbol EA that compiled and ran then but I have tried to run it now and it has generated 3 errors.



I'm guessing the data type specification has changed for the FrameInputs function or they have been tightened up. 


Where can I find a change log for the different versions of MQL5?


Many thanks


 
EdFuk:

Where can I find a change log for the different versions of MQL5?

For starters, change your int to a uint and recompile.

bool  FrameInputs(
   ulong    pass,                // The number of a pass in the optimization
   string&  parameters[],        // An array of strings of form "parameterN=valueN"
   uint&    parameters_count     // The total number of parameters
   );

(FrameInputs - Working with Optimization Results - MQL5 Reference).


Based on your other error, change your short to a ushort and recompile.

Edit: I found some GetClassNameW code.

void GetWindowData(HANDLE w, string &clazz, string &title)
{
   static ushort receiver[MAX_PATH];
   if(GetWindowTextW(w, receiver, MAX_PATH))
   {
      title = ShortArrayToString(receiver);
   }
   if(GetClassNameW(w, receiver, MAX_PATH))
   {
      clazz = ShortArrayToString(receiver);
   }
}

(DLL connection specifics - Advanced language tools - MQL5 Programming for Traders).

Unfortunately, I've encountered deprecated code in the official documentation before. I can't help you with that. Sorry.

 
Ryan L Johnson #:

For starters, change your int to a uint and recompile.

(FrameInputs - Working with Optimization Results - MQL5 Reference).


Based on your other error, change your short to a ushort and recompile.

Edit: I found some GetClassNameW code.

(DLL connection specifics - Advanced language tools - MQL5 Programming for Traders).

Unfortunately, I've encountered deprecated code in the official documentation before. I can't help you with that. Sorry.

Thanks for the reply. Yes I've made the changes. It'd be nice if there was a change log somewhere.


Anyway I now have a divide by zero error when running on history data. Never encountered that before.

 

I'm still getting a zero divide error when running. I think it might be to do with the following line:


MTTESTER::GetSettings(settings_str);


which is now not producing a valid result in settings_str. It is giving NULL.

Has something changed with the way the function works? Is there a change to MTTester.mgh that I need to be aware of? The MTTester.mgh file I have looks different to the one linked on here now. For example I don't have GetSettings2 function in there.


Many thanks,

Ed

 
EdFuk #:

Has something changed with the way the function works? Is there a change to MTTester.m[q]h that I need to be aware of?

Not to my knowledge. I use a Script that includes MTTester.mqh without issue.

The current MTTester.mqh file is at:

Code Base

MultiTester

fxsaber, 2025.04.04 10:53

Multiple runs/optimisations in Tester.

 
Ryan L Johnson #:

Not to my knowledge. I use a Script that includes MTTester.mqh without issue.

The current MTTester.mqh file is at:


No the current last version is on the Russian Codebase.

https://www.mql5.com/ru/code/26132

MultiTester
MultiTester
  • 2019.07.19
  • www.mql5.com
Множественные прогоны/оптимизации в Тестере.
 
Alain Verleyen #:

No the current last version is on the Russian Codebase.

https://www.mql5.com/ru/code/26132

Having a quick look at the MTTester.mqh file I have it looks different to the latest ones. I will update and see what happens. Where is the MTTester.mqh found? I can’t see it on the page you linked. 

Cheers,


E

 
Alain Verleyen #:

No the current last version is on the Russian Codebase.

https://www.mql5.com/ru/code/26132

It seems that I will never figure out how the English Forum interacts/fails to interact with the non-English Forums.
 
EdFuk #:

I'm still getting a zero divide error when running. I think it might be to do with the following line:



which is now not producing a valid result in settings_str. It is giving NULL.

Has something changed with the way the function works? Is there a change to MTTester.mgh that I need to be aware of? The MTTester.mgh file I have looks different to the one linked on here now. For example I don't have GetSettings2 function in there.


Many thanks,

Ed

Right....I found the file and when I compile it I get these errors:


Any ideas?

 
EdFuk #:

Right....I found the file and when I compile it I get these errors:


Any ideas?

As you've been away for a couple of years, which MT5 Build number are you using?
 
Ryan L Johnson #:
It seems that I will never figure out how the English Forum interacts/fails to interact with the non-English Forums.
The original for this library is in Russian. Om other languages, the codebase/forum topics are created automatically. Though there is currently a bug, when the OP update his original (Russian codebase in our case), the files on the other languages are NOT updated automatically.