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 +}