Libraries: MultiTester - page 42

 

Good afternoon!

Is it possible from the script to change the start and end dates of the optimisation period that were set when the script was started?


In this case it would be possible to expand the optimisation options.


Regards, Alexander

 
klycko #:

Is it possible from the script to change the start and end dates of the optimisation period that were set when the script was run?

MTTESTER::SetValue(Settings, "FromDate", TimeToString(D'2020.01.01', TIME_DATE));
MTTESTER::SetValue(Settings, "ToDate", TimeToString(TimeCurrent(), TIME_DATE));
 
fxsaber #:

Thank you!

 
Fantastic library !!!
 
fxsaber #:
You have received an opt file in a byte array. Next, you need to feed it into Cache.

Good afternoon!


The question concerns the Run procedure.

I can't understand why the command: Settings[0] = Cache.TesterString(Pos);

messes up the settings string Settings[0].

Below is the code text, and the data from the log is attached.

Regards, Alexander.


Run(Settings[0]); // Run genetic optimisation on parameter TF

TESTERCACHE<ExpTradeSummary> Cache;

GLOC = MTTESTER::GetLastOptCache(Bytess); // Get opt file into Bytess byte array

CL = Cache.Load(Bytess); // Feed the Bytess byte array into Cache

Print(" GLOC = ",GLOC," CL = ",CL); // Write and read diagnosis

// ProfitNow = Cache[GetMaxProfitPos(Cache)].profit; // Maximum profit https://www.mql5.com/ru/forum/318998/page2#comment_13846951

int NomProchMaxProfit = Cache[GetMaxProfitPos(Cache)].Pass; // Number of the pass with maximum profit

// Cache.GetInputs(IndexMaxProfitRuna,Paramas);

// prWrite2 = Cache.Save(OptFile); // Save the Run result to an opt file in MQL5\Files

// prRead2 = Cache.Load(OptFile); // Read for checking from MQL5\Files

// Print(OptFile+" write = ",prWrite2," read = ",prRead2); // Write and read diagnosis

Pos = GetMaxProfitPos(Cache);

Cache.SaveSet(Pos); // Create a set file of the most profitable pass in MQL5\Files


Print("Pos = ",Pos," NomProchMaxProfit = ",NomProchMaxProfit);

Print("Before Cache.TesterString(Pos) ",PrGenetic," NumPeriod=",NumPeriod,"\nControl Genetics: \n",Settings[0]);


Settings[0] = Cache.TesterString(Pos); // Write new settings to the current settings string

// In the previous command, the Settings[0] string is very ugly, although the TF=20 value is set correctly.

Print("After Cache.TesterString(Pos) ",PrGenetic," NumPeriod=",NumPeriod,"\nControl of genetics: \n",Settings[0]);


Библиотеки: TesterCache - Что такое 0xCACA?
Библиотеки: TesterCache - Что такое 0xCACA?
  • 2019.08.31
  • Good Beer
  • www.mql5.com
Да и дальше взаимодействия с Оптимизатором нет никакого. в кеше Оптимизатора по каждому проходу хранятся все стат. Бонусом идет возможность запуска любого прохода из обновленной таблицы стандартными средствами в два щелчка
Files:
kbrl69.txt  12 kb
 
klycko #:

// In the previous command the Settings[0] line is very ugly, although the TF=20 value is set correctly.

I don't get it.
 
fxsaber #:
I don't get it.

Afternoon!

The Settings[0] = Cache.TesterString(Pos); command sets highly distorted information in Settings[0], although the found optimal value TF=20 is set correctly.

But the very structure of Settings[0] is already destroyed. Even the right border of the interval for TF has been changed from H1 to M12.

In the attached log the Settings[0] line is printed before and after the execution of the above command.

I can't understand why this command distorts theSettings[0] string so much.

 
klycko #:

I can't understand why this command distorts the Settings[0] string so badly.

Please send the opt-file to LS.

 
klycko #:

Optimisation=1 changed, although it should not be changed

If a GA is selected, but the number of passes is small, the Tester automatically enters the full search mode. That is why opt-file after selecting GA sometimes shows that there was a full overrun. Reading this value is correct.

 
klycko #:

Further, data structures have been changed for many parameters:

Baza=46 Correct should be: Baza=46|||20|||1|||50|||N

Ranges of non-optimised parameters are not written (exception - bool-parameters) in the opt-file. As a consequence, changing such a range does not affect the generator of the opt-file name. Correct work here.

Applying such "reduced" settings does not violate the previously selected ranges of non-optimisable input parameters.