//+------------------------------------------------------------------+ //| LatencyReport.mq5 | //| Copyright 2026, MetaQuotes Ltd. | //| www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2026, MetaQuotes Ltd." #property link "https://www.mql5.com" #property version "1.00" #property description "Повторный расчёт отчёта из архивных CSV" #property description "по ТЗ §8/§10. Читает только исходные файлы." #property description "Пересчитывает интервалы, summary и гистограммы." #property description "Не обращается к текущему счёту." #property script_show_inputs #include "..\Include\RequestLatencyLab\Models.mqh" #include "..\Include\RequestLatencyLab\CsvStorage.mqh" #include "..\Include\RequestLatencyLab\Statistics.mqh" #include "..\Include\RequestLatencyLab\ReportBuilder.mqh" input string InpDatasetDir = "RequestLatencyLab\\RLL-C1"; // каталог набора в песочнице input string InpOutputDir = "RequestLatencyLab\\report-rebuilt"; //--- R4-B6 (E4): report-only из пяти завершённых E1 ASYNC datasets input bool InpE4Mode = true; // E4: multi-dataset reuse input string InpE4Dataset2 = "RequestLatencyLab\\RLL-C1"; // E1 серия 2 input string InpE4Dataset3 = "RequestLatencyLab\\RLL-C1"; // E1 серия 3 input string InpE4Dataset4 = "RequestLatencyLab\\RLL-C1"; // E1 серия 4 input string InpE4Dataset5 = "RequestLatencyLab\\RLL-C1"; // E1 серия 5 input int InpE4ExpectedMainPerSeries = 100; // R5-B7: MAIN-квота серии //+------------------------------------------------------------------+ //| Формирование отчёта о замерах | //+------------------------------------------------------------------+ void OnStart(void) { LabError err; const string samples_path = InpDatasetDir + "\\samples.csv"; string content; if(!CCsv::LoadUtf8(samples_path, content, err)) { Print("LatencyReport: входной файл не найден: " + err.message); return; } if(InpE4Mode) { //--- R4-B6: E4 — анализ пяти E1 ASYNC серий без новых samples string dirs[5]; dirs[0] = InpDatasetDir; dirs[1] = InpE4Dataset2; dirs[2] = InpE4Dataset3; dirs[3] = InpE4Dataset4; dirs[4] = InpE4Dataset5; if(CReportBuilder::RebuildE4(dirs, 5, "E4-POOLED", InpOutputDir + "\\", err, InpE4ExpectedMainPerSeries)) Print("LatencyReport: E4 reuse-анализ завершён, отчёт в Files\\" + InpOutputDir); else Print("LatencyReport: E4 FAILED: " + err.message); return; } //--- полный пересчёт из исходных CSV if(CReportBuilder::RebuildReport(samples_path, InpOutputDir + "\\", err)) Print("LatencyReport: пересчёт завершён, отчёт в Files\\" + InpOutputDir); else Print("LatencyReport: ПЕРЕСЧЁТ НЕ УДАЛСЯ: " + err.message); } //+------------------------------------------------------------------+