2026-04-12 11:56:05 -05:00
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| Orquestador.mq5 |
|
|
|
|
|
//| Copyright 2026,Niquel Mendoza. |
|
|
|
|
|
//| https://www.mql5.com/en/users/nique_372 |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
#property copyright "Copyright 2026,Niquel Mendoza."
|
|
|
|
|
#property link "https://www.mql5.com/en/users/nique_372"
|
|
|
|
|
#property version "1.00"
|
|
|
|
|
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| Include |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
#include <TSN\\MqlCI\\Main.mqh>
|
|
|
|
|
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| Global variables |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
CMqlCIClassCi g_ci_ea;
|
|
|
|
|
#define FOLDER_CI "EasySbAiCI\\"
|
|
|
|
|
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| Expert initialization function |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
int OnInit()
|
|
|
|
|
{
|
|
|
|
|
//---
|
|
|
|
|
// Configraucion inciial
|
|
|
|
|
MqlCiConfigCompiler config;
|
|
|
|
|
config.max_timeout_ms_compile = (60 * 1000); // 1 minuto
|
|
|
|
|
config.file_name_out_json = FOLDER_CI + "result_logs.json";
|
|
|
|
|
config.file_name_read_py = FOLDER_CI + "read_py.bin";
|
|
|
|
|
config.file_name_res = FOLDER_CI + "result.bin";
|
|
|
|
|
config.filename_compiled_log = TERMINAL_MT5_ROOT + "Files\\" + FOLDER_CI + "last_compile_log.log";
|
|
|
|
|
config.max_timeout_esecution_per_test = (60 * 5); // Maximo 5 minuto por test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---
|
|
|
|
|
TestExpertCi experts[1];
|
|
|
|
|
|
|
|
|
|
// Test de chekeo de resultados de comparcion
|
|
|
|
|
experts[0].expert_ex5_name = "Experts\\Shared Projects\\EasySbAi\\Validation\\BackComparer\\EA.ex5";
|
|
|
|
|
experts[0].expert_mq5_path = "Shared Projects\\EasySbAi\\Validation\\BackComparer\\EA.mq5";
|
|
|
|
|
experts[0].symbol = _Symbol;
|
|
|
|
|
experts[0].timeframe = _Period;
|
|
|
|
|
experts[0].ResizeParams(2); // 3 siempre (1 exptert name reservado | 2 chart id )
|
|
|
|
|
|
|
|
|
|
// Expertos a testerar;
|
|
|
|
|
g_ci_ea.AddLogFlags(LOG_ALL);
|
|
|
|
|
if(!g_ci_ea.Init(config, experts))
|
|
|
|
|
return INIT_FAILED;
|
|
|
|
|
|
|
|
|
|
//---
|
|
|
|
|
if(!g_ci_ea.RunTesterEA(250, "Shared Projects\\ExtraCodes\\MultiTester\\RunnerProtocol\\Runner", (1000 * 30)))
|
|
|
|
|
return INIT_FAILED;
|
|
|
|
|
|
|
|
|
|
//---
|
|
|
|
|
if(!g_ci_ea.First()) // Primera ejeuccion | Compilacion
|
|
|
|
|
return INIT_FAILED;
|
|
|
|
|
|
|
|
|
|
//---
|
|
|
|
|
return(INIT_SUCCEEDED);
|
|
|
|
|
}
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| Expert deinitialization function |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
void OnDeinit(const int reason)
|
|
|
|
|
{
|
|
|
|
|
//---
|
|
|
|
|
}
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| Expert tick function |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
void OnTick()
|
|
|
|
|
{
|
|
|
|
|
//---
|
|
|
|
|
}
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| ChartEvent function |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
void OnChartEvent(const int32_t id,
|
|
|
|
|
const long &lparam,
|
|
|
|
|
const double &dparam,
|
|
|
|
|
const string &sparam)
|
|
|
|
|
{
|
|
|
|
|
//---
|
|
|
|
|
g_ci_ea.ChartEvent(id, lparam, dparam, sparam);
|
|
|
|
|
}
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| Timer function |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
void OnTimer()
|
|
|
|
|
{
|
|
|
|
|
//---
|
|
|
|
|
g_ci_ea.TimerEvent();
|
|
|
|
|
}
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//+------------------------------------------------------------------+
|