From 736174d74a5fb87b4f67bd0cacae7347ccf6c024 Mon Sep 17 00:00:00 2001 From: Toh4iem9 Date: Thu, 4 Dec 2025 10:55:16 +0100 Subject: [PATCH] refactor: --- Scripts/MyScripts/Close_Charts_By_Symbol.mq5 | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Scripts/MyScripts/Close_Charts_By_Symbol.mq5 b/Scripts/MyScripts/Close_Charts_By_Symbol.mq5 index 80d92c8..c4a7451 100644 --- a/Scripts/MyScripts/Close_Charts_By_Symbol.mq5 +++ b/Scripts/MyScripts/Close_Charts_By_Symbol.mq5 @@ -42,10 +42,7 @@ void OnStart() long curr_chart = ChartFirst(); int closed_count = 0; -// We need to collect IDs first, because closing a chart while iterating might break ChartNext logic -// actually ChartNext takes the previous ID. If we close it, the ID is invalid. -// So we must collect all IDs first. - +// Collect IDs first long chart_ids[]; int total_charts = 0; @@ -61,7 +58,6 @@ void OnStart() for(int i=0; i