From d4d9ad67f06e164493a8c85d3c97462677e4cad4 Mon Sep 17 00:00:00 2001 From: jozephbrasil Date: Wed, 18 Oct 2023 07:39:17 -0300 Subject: [PATCH] Update Seconds-Main.mq5 - Fixing comment when OnDeInit - Added comment to show the indicator status --- Charting/Seconds-Main.mq5 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Charting/Seconds-Main.mq5 b/Charting/Seconds-Main.mq5 index 42a7392..5c55a5f 100644 --- a/Charting/Seconds-Main.mq5 +++ b/Charting/Seconds-Main.mq5 @@ -105,7 +105,10 @@ void OnInit() void OnDeinit(const int reason) { if(visible) + { Disable(); + Comment(""); + } GlobalVariableTemp(appnamespace+Symbol()+"d_CHART_FIXED_MAX"); GlobalVariableSet(appnamespace+Symbol()+"d_CHART_FIXED_MAX",d_CHART_FIXED_MAX); @@ -316,9 +319,15 @@ void OnChartEvent(const int id, const long& lparam, const double& dparam, const if(lparam == 90) // Key Z { if(!visible) + { Enable(); + Comment("Seconds Enabled"); + } else + { Disable(); + Comment("Seconds Disabled"); + } visible=!visible; } } @@ -384,4 +393,4 @@ void _Print(string text) { return; Print(text); -} \ No newline at end of file +}