ChartIndicatorDelete also Deletes Alert Window
How can i report this bug to developers, please help
Alain Verleyen #:
Start to prove it's a bug but providing technical details to reproduce it.
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:
2021-09-11_01-13-49.zip
1484 kb
ChartIndicatorDelete() when it is called, it also deletes Alert popup window
Is it a bug? If so how to report it