ChartIndicatorDelete also Deletes Alert Window

 

ChartIndicatorDelete() when it is called, it also deletes Alert popup window
Is it a bug? If so how to report it

 
How can i report this bug to developers, please help
 
Dark Ryd3r #:
How can i report this bug to developers, please help
Start to prove it's a bug but providing technical details to reproduce it.
 
Alain Verleyen #:
Start to prove it's a bug but providing technical details to reproduce it.
#property indicator_chart_window
#include <Controls\Dialog.mqh>
#include <Controls\Button.mqh>

CAppDialog Indicator_name;
CButton SButton_1;

void OnInit() {
//--- run application
   Indicator_name.Run();
   Indicator_name.Add(SButton_1);
}
//----Creating SButton_1--------
   SButton_1.Create(0,"SButton_1",0,30,50,80,70);
   SButton_1.Text("Load MA");
   SButton_1.FontSize(10);
   SButton_1.Color(clrSnow);
   SButton_1.ColorBorder(clrSnow);
}

//+------------------------------------------------------------------+
//| ChartEvent function                                              |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam) {
//---
   Indicator_name.ChartEvent(id,lparam,dparam,sparam);
   if(id==CHARTEVENT_OBJECT_CLICK&&sparam=="SButton_1") {
     
if(id==CHARTEVENT_OBJECT_CLICK&&sparam=="SButton_1") {
      
      int handle_iMA = iCustom(NULL,PERIOD_M1,"MA");

      if (SButton_1.Pressed()) {
         ChartIndicatorAdd(0,0,handle_iMA);
      } else {
         ChartIndicatorDelete(0,0,"iLevels_"); // indicator shortname is  iLevels_
         ChartRedraw();
      }
   }
}

When

ChartIndicatorDelete

is called it deletes the Alert Popup Window

Video attached with proof.

Files:
 
Dark Ryd3r #:

When

is called it deletes the Alert Popup Window

Video attached with proof.

I confirm the bug. I will report it.

An other time please provide better code, it doesn't even compile and is using a custom indicator I don't have. I had to fix it.

 
Alain Verleyen #:

I confirm the bug. I will report it.

An other time please provide better code, it doesn't even compile and is using a custom indicator I don't have. I had to fix it.

Ok sorry for that and Thank you for reporting the bug. Hope it will be fixed
 
Alain Verleyen #:

I confirm the bug. I will report it.

An other time please provide better code, it doesn't even compile and is using a custom indicator I don't have. I had to fix it.

Bug is still present in the latest version of MT5. Is there anything I can do to prioritize it with Metaqoutes?