Discussing the article: "MQL5 Trading Tools (Part 39): Adding a Pinned-Tools Ribbon for Quick Access to Favorite Tools"

 

Check out the new article: MQL5 Trading Tools (Part 39): Adding a Pinned-Tools Ribbon for Quick Access to Favorite Tools.

We add a pinned-tools ribbon: a floating bar that exposes frequently used tools for one-click access without reopening the sidebar. The article implements the ordered pin set and its API, an anti-aliased pushpin control in the flyout, and the ribbon with offscreen clipping, user-resizable width, and horizontal scrolling. The result is faster activation of favorite tools from a draggable, resizable ribbon on the chart.

The sidebar and the pinned ribbon answer two different questions. The sidebar answers "what tools exist and how are they organized," so it sorts forty-plus tools into categories behind flyouts — ideal for discovery, but a three-step trip every time we draw. The pinned ribbon answers "what do I reach for constantly," so it is flat, small, and always one click away. Rather than replace the sidebar, we layer the ribbon beside it as a fast lane for the few tools we live in, while the sidebar stays the organized home for everything. This is how the native MetaTrader 5 terminal objects structure handles its pinned/favorite/starred objects and the ordered flyouts, which we want to use as a guide. See below.

MT5 PINNED CATEGORIES

In our case, we build this on the same foundation that the property ribbon has already established. The pinned ribbon is a floating bar with its own canvas, shadow, and drag behavior. It sits in the inheritance chain above the settings window, inherits the shared machinery, and receives events through the same shell routing as other floating surfaces. The set of pinned tools lives in the engine as an ordered list, so the order we pin in is the order the icons appear, and a pushpin control on each flyout row toggles a tool in and out of that list. A pinned-tools tile in the sidebar shows or hides the ribbon, and it stays hidden until the list has at least one entry.

Author: Allan Munene Mutiiria