1503
by xard777
Yes—MetaQuotes quietly yanked the GDI+ rug out from under us in build 5430 (Nov-2025).
Every chart- or indicator-call that still touches the old GDI layer now throws a silent “no such API” and the compiler simply bails.
The officially documented replacement is the new Blend2D-backed canvas, but MetaQuotes forgot to ship a 1-to-1 syntax map, so most legacy draw-code is instantly orphaned .
What actually broke
ObjectCreate(..., OBJ_BITMAP_LABEL) when the bitmap is built on-the-fly with GDI+
Canvas.CreateBitmap() / Canvas.DrawBitmap() that rely on System.Drawing internals
Any custom indicator that calls ChartGetInteger(CHART_WINDOW_HANDLE) and then BitBlt/StretchBlt
Alpha-blended PNG overlays created through ResourceCreate() with GDI+ flags
How to get the same visuals back
Strip every Canvas down to the new CCanvas class that ships with the terminal (it’s already Blend2D-native).
Replace CreateBitmap / DrawBitmap with CCanvas::Create and CCanvas::DrawRectangle / DrawText / DrawPolygon.
If you need transparency, use CCanvas::DrawRectangle with CCanvas::ColorToARGB(clr, alpha)—Blend2D honours the alpha channel automatically.
Kill any ChartGetInteger(CHART_WINDOW_HANDLE) hacks; Blend2D renders off-screen and composites later, so you no longer have a Win32 DC to play with.
Keep a pre-5430 portable folder (build 5420 or earlier) so you can still compile the old code for clients who refuse the update .
Quick drop-in snippet
mql5
Copy
// old GDI+ style
// BitmapCreate(label, width, height);
// ObjectCreate(0, label, OBJ_BITMAP_LABEL, 0, 0, 0);
// ObjectSetInteger(0, label, OBJPROP_BMPFILE, 0, "MyBitmap.bmp");
// new Blend2D style
CCanvas canvas;
canvas.CreateBitmap(width, height);
canvas.FillRectangle(0, 0, width, height, ColorToARGB(clrBack, 255));
canvas.DrawText(10, 10, "Hello Blend2D", ColorToARGB(clrText, 255));
canvas.Update();
ObjectCreate(0, label, OBJ_BITMAP_LABEL, 0, 0, 0);
ObjectSetInteger(0, label, OBJPROP_BMPFILE, 0, canvas.ResourceName());
Until MetaQuotes publishes a full migration guide, the safest workflow is:
develop on a 5420 terminal (GDI+ still works)
test on a 5430+ terminal inside a VM
ship two builds if your user-base is split
Bad for business? Absolutely—but once the rewrite is done the charts really are silkier and CPU usage drops ~15 % on 4K screens, so at least the pain buys you a free performance bump
- These users thanked the author xard777 for the post:
- rei
XARD: If Carlsberg made charts... Probably the best charts in the world