Build 5399 Bug(s)

My MetaTrader 5 just updated to Build 5399 on Microsoft Windows 11. When MetaTrader restarted, the font and CChartObjectButton border are not displayed the same on an existing indicator.

Here below, the first image on the left is what it looked like before Build 5399. The second image on the right is what it looks like now with Build 5399.

Before Build 5399      After Build 5399

Hope it gets fixed soon.

Documentation on MQL5: CChartObjectButton / Standard Library
Documentation on MQL5: CChartObjectButton / Standard Library
  • www.mql5.com
CChartObjectButton is a class for simplified access to "Button" graphical object properties. CChartObjectButton class provides access to...
idiamond:

My MetaTrader 5 just updated to Build 5399 on Microsoft Windows 11. When MetaTrader restarted, the font and CChartObjectButton border are not displayed the same on an existing indicator.

Here below, the first image on the left is what is lokked like before Build 5399. The second image on the right is what it looks like now with Build 5399.

     

Hope it gets fixed soon.

Assuming that both pics were taken and uploaded at the same scale, the font size in the after-pic appears to be larger. I would backup the ex5 file, open the mq5 file, edit the font size (if you don't have a font size input), and recompile (even if you don't make any edits). If the mq5 won't recompile due to a Compiler update, you still have the old backup.
Ryan L Johnson #:
Assuming that both pics were taken and uploaded at the same scale, the font size in the after-pic appears to be larger. I would backup the ex5 file, open the mq5 file, edit the font size (if you don't have a font size input), and recompile (even if you don't make any edits). If the mq5 won't recompile due to a Compiler update, you still have the old backup.

Looks like the borders are slighly different also, i.e. square corners vs rounded, or perhaps transparent borders that are showing the black background. 

Documenting the issue for now, if anyone else notices issues in their environment. I haven't seen the Build 5399 change log published yet.

idiamond #:

Looks like the borders are slighly different also, i.e. square corners vs rounded, or perhaps transparent borders that are showing the black background. 

Documenting the issue for now, if anyone else notices issues in their environment. I haven't seen the Build 5399 change log published yet.

I believe that. The after-pic's font looks darker and crisper too. I guess that the thing that irks me the worst is the text spacing. 

For some reason, I can't zoom in on your pic (my eyes aren't the best). Maybe it's a file type issue.

Luckily I use a VMware virtual machine with snapshots. I rolled back the my Friday Build 5370 snapshot and started over.

Removed all other indicators, and set the line graph color to None. Changed the Chart Background color to Aqua. Set the CChartObjectButton border color to Magenta using the indicator input, not a recompile.

Below here, the first image on the left is Build 5370. The second image on the right is Build 5399. In addition to the font difference, it does in fact show the border is squared now and somehow there is a blank or transparent portion of the border too.

Build 5370 Aqua BG      Build 5399 Aqua BG

For documentation. Waiting for Build 5399 change log.

Ryan L Johnson #:

I believe that. The after-pic's font looks darker and crisper too. I guess that the thing that irks me the worst is the text spacing. 

For some reason, I can't zoom in on your pic (my eyes aren't the best). Maybe it's a file type issue.

The images are showing as actual size. Maybe that is why you can't zoom? You can use the Windows 11 Magnifer tool to enlarge.

idiamond #:
Waiting for Build 5399 change log.

This is a beta build, not a release build, so I don't think there will be a changelog for it.

Based on this post, I can assume that they are working on updating the chart graphics engine (GDI -> Blend2D).

If you provide the code, it will greatly increase the chances of a fix (if it really is a terminal bug). Not your super-secret million-line code, but the bare minimum code to reproduce the problem (which creates one button, for example). Plus, screenshots of the provided code running on different builds.

What's new in MetaTrader 5
What's new in MetaTrader 5
  • www.metatrader5.com
This update delivers improvements to the platform's web version
the price scale is gone, on MT5 on mac OS "wine wrapper " 

in both 5398 and  5399

is it just me! 

themas2025 #:
the price scale is gone, on MT5 on mac OS "wine wrapper " 

in both 5398 and  5399

is it just me! 

Please provide a screenshot. Also please specify the Wine version.
Vladislav Boyko #:

This is a beta build, not a release build, so I don't think there will be a changelog for it.

Based on this post, I can assume that they are working on updating the chart graphics engine (GDI -> Blend2D).

If you provide the code, it will greatly increase the chances of a fix (if it really is a terminal bug). Not your super-secret million-line code, but the bare minimum code to reproduce the problem (which creates one button, for example). Plus, screenshots of the provided code running on different builds.

Hmm... if it is a Beta build, why did my MetaTrader update automatically? The About on my system does not indicate it is Beta. Where is the option setting to use Beta's? I am using the MQL5.com download and MetaQuotes demo account.
Vladislav Boyko #:

This is a beta build, not a release build, so I don't think there will be a changelog for it.

Based on this post, I can assume that they are working on updating the chart graphics engine (GDI -> Blend2D).

If you provide the code, it will greatly increase the chances of a fix (if it really is a terminal bug). Not your super-secret million-line code, but the bare minimum code to reproduce the problem (which creates one button, for example). Plus, screenshots of the provided code running on different builds.

Here is a pruned version of the code. (Note that in the full version there is also an option to show periods that I pruned most of out.)


#property strict #include <ChartObjects\ChartObjectsTxtControls.mqh>           // CChartObjectButton sinput int    ButtonsPerRow            = 14;                  // Number of Symbol Columns sinput int    XButtonSpacing           = 0;                   // Horizontal Space Between Buttons sinput int    YButtonSpacing           = 0;                   // Vertical Space Between Buttons sinput bool   bTransparent             = false;               // Transparent Buttons sinput long   ZOrder                   = 1;                   // ZOrder (Chart Click Priority) sinput color  ButtonColr               = clrWhite;            // Button Color sinput color  ButtonBorderColr         = clrDarkGray;         // Button Border Color sinput string sFontName                = "Calibri Light";     // Button Font Name sinput int    iFontSize                = 8;                   // Button Font Size sinput color  TextColr                 = clrBlack;            // Button Text Color sinput color  ButtonColrSelected       = clrDimGray;          // Button Color - Selected sinput color  ButtonBorderColrSelected = clrDarkGray;         // Button Border Color - Selected sinput string sFontNameSelected        = "Calibri Light";     // Button Font Name - Selected sinput int    iFontSizeSelected        = 8;                   // Button Font Size - Selected sinput color  TextColrSelected         = clrWhite;            // Button Text Color - Selected int ButtonsInARow; CArrayString casSymbols;                // Symbols to use CChartObjectButton ObjButtonSymbols[];  // Symbol Button Objects for Chart Mode // // int OnInit() {     bool bResult;     int iResult, nSymbols, nColumns = 0;     uint FontFlags = FW_NORMAL;     CPoint Margin;     CSize TxtSize, TxtSize2;     iResult = PrepareSymbols(&casSymbols);   nSymbols = casSymbols.Total();     Margin.x = MarginX;  Margin.y = MarginY;     if ((nColumns = MathMax(nSymbols, nPeriods)) < ButtonsPerRow)       ButtonsInARow = nColumns;       else ButtonsInARow = ButtonsPerRow;     // Determine Maximum Symbol Button Sizes     MaxTextSize(casSymbols, sFontName,         iFontSize,         FontFlags, TxtSize);     MaxTextSize(casSymbols, sFontNameSelected, iFontSizeSelected, FontFlags, TxtSize2);     TxtSize.cx  = MathMax(TxtSize.cx, TxtSize2.cx);  TxtSize.cy = MathMax(TxtSize.cy, TxtSize2.cy);               iResult = CreateButtons(&casSymbols, ObjButtonSymbols, &casPeriods, ObjButtonPeriods);          iResult = SetLayout(&casSymbols, ObjButtonSymbols, &casPeriods, ObjButtonPeriods, BaseCorner, Margin, TxtSize);          SetButtonSelections(ObjButtonSymbols, _Symbol);                   bResult = ChartSetInteger(0, CHART_FOREGROUND, bChartForeground);  // Price chart in the foreground     return (INIT_SUCCEEDED); } // OnInit()  // void MaxTextSize(CArrayString &ArrayString, const string Font, const int FontSize, const uint FontFlags, CSize& MaxSize) {     bool bResult;     int Indx, nTotal = ArrayString.Total();     uint uiWidth, uiHeight, uiMaxWidth = 0, uiMaxHeight = 0;          // Determine Maximum Period Button Sizes     bResult = TextSetFont(Font, FontSize * -10, FontFlags);     for (Indx = 0; Indx < nTotal; Indx++)       {   // Get Max Width and Max Height of all Unselected Periods using this Font and Size           TextGetSize(" " + ArrayString.At(Indx) + " ", uiWidth, uiHeight);           if (uiWidth > uiMaxWidth)             uiMaxWidth = uiWidth;           if (uiHeight > uiMaxHeight)             uiMaxHeight = uiHeight;       }     MaxSize.cx = (int)uiMaxWidth;  MaxSize.cy = (int)uiMaxHeight; } // int CreateButtons(CArrayString* SymbolsArray, CChartObjectButton& ButtnSymbols[], CArrayString* PeriodsArray, CChartObjectButton& ButtnPeriods[]) {     bool bResult;     int Total, Indx, iResult, iReturn = 0;     string UniqueName;     // Symbol Buttons     Total = SymbolsArray.Total();     ArrayFree(ButtnSymbols);     iResult = ArrayResize(ButtnSymbols, Total);     for (Indx = 0; Indx < Total; Indx++)       {   UniqueName = sUniquePrefix + SymbolsArray[Indx] + "-" + IntegerToString(Indx);           bResult = ButtnSymbols[Indx].Create(0, UniqueName, iChartWindow, 0, 0, 1, 1);           bResult = ButtnSymbols[Indx].Description(SymbolsArray[Indx]);       }     iReturn += Total;     return(iReturn); } // CreateButtons() // Determine the Button Column. Start at Left if using a Left Corner, Reverse Order if using a Right Corner  int Column(const int ItemIndex, const ENUM_BASE_CORNER Corner, const int ItemsInARow) {     if ((Corner == CORNER_RIGHT_LOWER) || (Corner == CORNER_RIGHT_UPPER))        return( (ItemsInARow - 1) - (ItemIndex % ItemsInARow) );     return( ItemIndex % ItemsInARow );  // Modulus Remainder } // void SetCoordinates(CChartObjectButton& Button, CPoint& Position, CSize& Size) {   Button.X_Distance(Position.x);  Button.Y_Distance(Position.y);  Button.X_Size(Size.cx);  Button.Y_Size(Size.cy);  } // int SetLayout(CArrayString* SymbolsArray, CChartObjectButton& ButtnSymbols[], CArrayString* PeriodsArray, CChartObjectButton& ButtnPeriods[],               const ENUM_BASE_CORNER basecorner, CPoint& margin, CSize& ButtonSize) {     int iRow = 0, nRows, nButtonRows = 0, iCol, nSymbols, nPeriods, Indx, iReturn = 0;     CPoint ButtonPosition;     nSymbols = SymbolsArray.Total();     nRows = (nSymbols / ButtonsInARow);   // Div, Full Rows     if ((nSymbols % ButtonsInARow) > 0)   // Modulus Remainder, if a Partial Row       nRows++;     nButtonRows = nRows;     // Symbol Buttons     for (Indx = 0; Indx < nSymbols; Indx++)       {   // Determine the Button Row. Start at Top if using a Top Corner, Reverse Order if using a Lower Corner            if ((basecorner == CORNER_LEFT_LOWER) || (basecorner == CORNER_RIGHT_LOWER))             iRow = (nRows - 1) - (Indx / ButtonsInARow);             else iRow = Indx / ButtonsInARow;  // Div           iCol = Column(Indx, basecorner, ButtonsInARow);           ButtonPosition.x = margin.x + (iCol * (ButtonSize.cx + XButtonSpacing));           if ((basecorner == CORNER_RIGHT_LOWER) || (basecorner == CORNER_RIGHT_UPPER))             ButtonPosition.x += ButtonSize.cx;           ButtonPosition.y = margin.y + (iRow * (ButtonSize.cy + YButtonSpacing));           if ((basecorner == CORNER_LEFT_LOWER) || (basecorner == CORNER_RIGHT_LOWER))             ButtonPosition.y += ButtonSize.cy + ((nSymbols > 0) && (nPeriods > 0) ? SymbolPeriodSpacing : 0);           SetCoordinates(ButtnSymbols[Indx], ButtonPosition, ButtonSize);       }     iReturn += nSymbols;     return(iReturn); } // SetLayout() // void SetProperties(CChartObjectButton& Button, const color BackColor, const color BorderColor, const color Color, const string Font, const int FontSize,                                                const int PropBack, const long PropZOrder, const bool State, const ENUM_BASE_CORNER Corner) {   Button.BackColor(BackColor);  Button.BorderColor(BorderColor);  Button.Color(Color);  Button.Font(Font);  Button.FontSize(FontSize);     Button.SetInteger(OBJPROP_BACK, PropBack);  Button.SetInteger(OBJPROP_ZORDER, PropZOrder);  Button.State(State);  Button.Corner(Corner); } // void SetButtonSelections(CChartObjectButton& Buttons[], const string SelectedTxt) {   int Indx, nButtons;     for (Indx = 0, nButtons = ArraySize(Buttons); Indx < nButtons; Indx++)       {   if (Buttons[Indx].Description() == SelectedTxt)  // Current Chart Symbol             {    SetProperties(Buttons[Indx], ButtonColrSelected, ButtonBorderColrSelected, TextColrSelected, sFontNameSelected, iFontSizeSelected,                                               bTransparent, ZOrder, false, BaseCorner);                  continue;             }           // Non-selected Button           SetProperties(Buttons[Indx], ButtonColr, ButtonBorderColr, TextColr, sFontName, iFontSize, bTransparent, ZOrder, false, BaseCorner);       } } // SetButtonSelections() 
12
To add comments, please log in or register