Libraries: MultiTester - page 59

 
klycko #:

Unfortunately your script doesn't work

I checked - it works. But perhaps we have different interpretations of the set-file concept.

I added these lines in case of a different interpretation.

// Load/Save Tester's set-file.
#property script_show_inputs

input bool inLoad = true; // Settings Load/Save - true/false

#include <fxsaber\MultiTester\MTTester.mqh> // https://www.mql5.com/en/code/26132

#define  EA_INPUTS "[TesterInputs]\r\n"

void OnStart()
{
  const string FileName = __FILE__ + ".set";
  
  string Settings;
  ushort Words[];  
      
  if (inLoad) // Load settings.
  {
    Print("Load: " + (string)FileLoad(FileName, Words));
    Settings = EA_INPUTS + ShortArrayToString(Words, 1); // 1 - Unicode
    
    Print(MTTESTER::SetSettings(Settings));
  
  }
  else if (MTTESTER::GetSettings(Settings)) // Save settings.
  {
    Settings = StringSubstr(Settings, StringFind(Settings, EA_INPUTS) + StringLen(EA_INPUTS));
    
    Words[ArrayResize(Words, 1) - 1] = 0xFEFF; // 1 - Unicode
    
    StringToShortArray(Settings, Words, ArraySize(Words));    
    Print("Save: " + (FileSave(FileName, Words) ? (string)ArraySize(Words) : "error"));
  }
}
 
fxsaber #:

I checked - it works. But perhaps we have different interpretations of the set-file concept.

I added these lines in case of a different interpretation.

Thank you very much for your time and intelligence!

I have already overcome these difficulties with the help of Google AI.

I sent you this working solution in the form of OX.mq5 script.

Thank you!

 
metatrader version 5.00
build 5800 17-apr-2026

I'm using the files exactly the same as the .zip

Do you have any suggestions as to what it might be?

Files:
fileapi.mqh  10 kb
winuser.mqh  82 kb
 
Thomaz Diogo Cimim #:
Do you have any suggestions on what this might be?

It's most likely the wrong version of the mqh file. Everything compiles for me and other users.