[BUG] MT5 Build 5440 (21 Nov 2025): Critical GUI Rendering Issue in Custom MQL Applications - page 4

 

Another bug in build 5464  -  Very slow rendering of OBJ_TEXT.  When drawing large number of text objects the platform freezes completely.

//+------------------------------------------------------------------+
//|                                                         Bugs.mq5 |
//|                                  Copyright 2025, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2025, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"

string objid="bug ";
string objname;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   EventSetMillisecondTimer(1000);

   datetime time=iTime(Symbol(),PERIOD_CURRENT,0);
   double price=SymbolInfoDouble(Symbol(),SYMBOL_BID);
      
   for(int i=0; i<50000; i++)
     {
      objname=objid+"OBJ_TEXT_"+(string)i;
      ObjectCreate(0,objname,OBJ_TEXT,0,0,0);
      ObjectSetInteger(0,objname,OBJPROP_BACK,false);
      ObjectSetInteger(0,objname,OBJPROP_HIDDEN,false);
      ObjectSetInteger(0,objname,OBJPROP_SELECTABLE,false);
      ObjectSetInteger(0,objname,OBJPROP_ANCHOR,ANCHOR_CENTER);
      ObjectSetInteger(0,objname,OBJPROP_COLOR,clrBlue);
      ObjectSetInteger(0,objname,OBJPROP_TIME,0,time);
      ObjectSetDouble(0,objname,OBJPROP_PRICE,0,price);
      ObjectSetInteger(0,objname,OBJPROP_FONTSIZE,20);
      ObjectSetString(0,objname,OBJPROP_FONT,"Verdana");
      ObjectSetString(0,objname,OBJPROP_TEXT,"g");
     }
     
   ChartRedraw();

   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   EventKillTimer();
   ObjectsDeleteAll(0,objid);
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {

  }
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {

  }
//+------------------------------------------------------------------+
 
Tsvetan Tsvetanov #:

I'm on b5430.  But I also keep an eye on the beta builds.  Just trying to help.

Here you see the new bugs with OBJ_BUTTON and OBJ_RECTANGLE_LABEL.

Confirmed with build 5464. Reported to MQ attention.
 
Tsvetan Tsvetanov #:
color of OBJ_RECTANGLE is also incorrectly affected by CHART_COLOR_BACKGROUND
Confirmed and reported.
 
Tsvetan Tsvetanov #:
Very slow rendering of OBJ_TEXT.  When drawing large number of text objects the platform freezes completely.

Also confirmed and reported.

Thank you very much.

 
Alain Verleyen #:

Also confirmed and reported.

Thank you very much.

You're welcome.   I have more....

Here is another one -  In build 5430 the trend lines have rounded ends and if you set time0 = time1 and price0 = price1 the trend line will appear as a round dot.

In build 5464 the trend lines have square ends and if you set time0 = time1 and price0=price1 the trend line disappears.

//+------------------------------------------------------------------+
//|                                                         Bugs.mq5 |
//|                                  Copyright 2025, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2025, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"

int timer=0;
string objid="bug ";
string objname;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   EventSetMillisecondTimer(1000);

   datetime time0=iTime(Symbol(),PERIOD_CURRENT,0);
   datetime time1=time0;
   double price0=SymbolInfoDouble(Symbol(),SYMBOL_BID);
   double price1=price0;

   objname=objid+"OBJ_TREND_1";
   ObjectCreate(0,objname,OBJ_TREND,0,0,0);
   ObjectSetInteger(0,objname,OBJPROP_BACK,false);
   ObjectSetInteger(0,objname,OBJPROP_HIDDEN,false);
   ObjectSetInteger(0,objname,OBJPROP_SELECTABLE,true);
   ObjectSetInteger(0,objname,OBJPROP_RAY,false);
   ObjectSetInteger(0,objname,OBJPROP_STYLE,STYLE_SOLID);
   ObjectSetInteger(0,objname,OBJPROP_WIDTH,20);
   ObjectSetInteger(0,objname,OBJPROP_COLOR,clrRed);
   ObjectSetInteger(0,objname,OBJPROP_TIME,0,time0);
   ObjectSetInteger(0,objname,OBJPROP_TIME,1,time1);
   ObjectSetDouble(0,objname,OBJPROP_PRICE,0,price0);
   ObjectSetDouble(0,objname,OBJPROP_PRICE,1,price1);

   ChartRedraw();

   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   EventKillTimer();
   ObjectsDeleteAll(0,objid);
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {

  }
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {
   timer++;

   if(timer==1)
     {
      datetime time0=iTime(Symbol(),PERIOD_CURRENT,0);
      datetime time1=iTime(Symbol(),PERIOD_CURRENT,100);
      double price0=SymbolInfoDouble(Symbol(),SYMBOL_BID);
      double price1=price0+price0*0.002;
      ObjectSetInteger(0,objname,OBJPROP_TIME,0,time0);
      ObjectSetInteger(0,objname,OBJPROP_TIME,1,time1);
      ObjectSetDouble(0,objname,OBJPROP_PRICE,0,price0);
      ObjectSetDouble(0,objname,OBJPROP_PRICE,1,price1);
      ChartRedraw();
     }

   if(timer==2)
     {
      timer=0;
      datetime time0=iTime(Symbol(),PERIOD_CURRENT,0);
      datetime time1=time0;
      double price0=SymbolInfoDouble(Symbol(),SYMBOL_BID);
      double price1=price0;
      ObjectSetInteger(0,objname,OBJPROP_TIME,0,time0);
      ObjectSetInteger(0,objname,OBJPROP_TIME,1,time1);
      ObjectSetDouble(0,objname,OBJPROP_PRICE,0,price0);
      ObjectSetDouble(0,objname,OBJPROP_PRICE,1,price1);
      ChartRedraw();
     }
  }
//+------------------------------------------------------------------+
 

More bugs -  In build 5430 and 5464,  CHART_SCALEFIX, CHART_SHOW_PRICE_SCALE, CHART_SHOW_DATE_SCALE, CHART_FIXED_MAX and CHART_FIXED_MIN   are not working in the Strategy Tester in visual mode.

//+------------------------------------------------------------------+
//|                                                         Bugs.mq5 |
//|                                  Copyright 2025, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2025, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   ChartSetInteger(0,CHART_SCALEFIX,true);
   ChartSetInteger(0,CHART_SHOW_PRICE_SCALE,false);
   ChartSetInteger(0,CHART_SHOW_DATE_SCALE,false);

   double price=SymbolInfoDouble(Symbol(),SYMBOL_BID);
   ChartSetDouble(0,CHART_FIXED_MAX,price+price*0.001);
   ChartSetDouble(0,CHART_FIXED_MIN,price-price*0.001);

   ChartRedraw();

   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {

  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   double price=SymbolInfoDouble(Symbol(),SYMBOL_BID);
   ChartSetDouble(0,CHART_FIXED_MAX,price+price*0.01);
   ChartSetDouble(0,CHART_FIXED_MIN,price-price*0.01);
  }
//+------------------------------------------------------------------+
 
Tsvetan Tsvetanov #:

You're welcome.   I have more....

Here is another one -  In build 5430 the trend lines have rounded ends and if you set time0 = time1 and price0 = price1 the trend line will appear as a round dot.

In build 5464 the trend lines have square ends and if you set time0 = time1 and price0=price1 the trend line disappears.

Confirmed and reported.

Funnily taking a screenshot give the correct rendering, so it's seems a bug that screenshot is still using the old GDI engine.

Chart EURUSD, H1, 2025.12.07 17:09 UTC, MetaQuotes Ltd., MetaTrader 5, Demo
Chart EURUSD, H1, 2025.12.07 17:09 UTC, MetaQuotes Ltd., MetaTrader 5, Demo
  • www.mql5.com
Chart EURUSD, H1, MetaQuotes Ltd.: Test
 
Tsvetan Tsvetanov #:

More bugs -  In build 5430 and 5464,  CHART_SCALEFIX, CHART_SHOW_PRICE_SCALE, CHART_SHOW_DATE_SCALE, CHART_FIXED_MAX and CHART_FIXED_MIN   are not working in the Strategy Tester in visual mode.

Charts on Visual Tester are not fully implemented, no idea if and when it will be.
 
Alain Verleyen #:
Confirmed and reported.
How and where do your report these issues?
 

Another old bug, not critical, but it should be fixed.

If you undock the chart window, then hide the toolbar and then restart the platform, the toolbar will appear again. The toolbar does not remember it's last state and always returns to default state - ON.

Also there should be some function to hide this toolbar from the code. 
For example:  ChartSetInteger(0,CHART_SHOW_TOOLBAR,false);

Undocked toolbar bug