2025-08-13 19:41:57 -04:00 | | | //+------------------------------------------------------------------+
|
| | | //| 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
|
2025-09-10 13:27:03 -04:00 | | | input int TimeoutMs = 60000; // Timeout for rebuild in ms (default: 60s)
|
2025-08-13 19:41:57 -04:00 | | |
|
| | | void OnStart()
|
| | | {
|
| | | Print("InsightsRebuild: starting rebuild from features.csv ...");
|
| | | CInsightsBuilder b(InKBPath, InFeaturesPath, OutInsights, ",");
|
2025-09-10 13:27:03 -04:00 | | | b.SetTimeoutMs(TimeoutMs);
|
2025-08-13 19:41:57 -04:00 | | | bool ok = b.Build();
|
2025-09-10 13:27:03 -04:00 | | | string full = TerminalInfoString(TERMINAL_COMMONDATA_PATH) + "\\Files\\" + OutInsights;
|
2025-08-13 19:41:57 -04:00 | | | if(ok)
|
| | | PrintFormat("InsightsRebuild: success. Wrote %s", full);
|
| | | else
|
| | | PrintFormat("InsightsRebuild: FAILED. See Experts log. Intended output: %s", full);
|
| | | }
|