mql5/Scripts/DualEA/InsightsRebuild.mq5
2025-08-13 20:11:22 -04:00

25 lines
1.2 KiB
MQL5

//+------------------------------------------------------------------+
//| InsightsRebuild.mq5|
//| Purpose: One-click rebuild of insights.json from features.csv |
//| Author: Windsurf Engineering |
//+------------------------------------------------------------------+
#property strict
// #property script_show_inputs // disabled for headless runs (kb_check)
#include "..\\Include\\KnowledgeBase.mqh"
input string InKBPath = "DualEA\\knowledge_base.csv"; // FILE_COMMON path
input string InFeaturesPath = "DualEA\\features.csv"; // FILE_COMMON path
input string OutInsights = "DualEA\\insights.json"; // FILE_COMMON path
void OnStart()
{
Print("InsightsRebuild: starting rebuild from features.csv ...");
CInsightsBuilder b(InKBPath, InFeaturesPath, OutInsights, ",");
bool ok = b.Build();
string full = TerminalInfoString(TERMINAL_COMMONDATA_PATH) + "\\\\Files\\\\" + OutInsights;
if(ok)
PrintFormat("InsightsRebuild: success. Wrote %s", full);
else
PrintFormat("InsightsRebuild: FAILED. See Experts log. Intended output: %s", full);
}