Discussing the article: "MQL5 Trading Tools (Part 31): Creating an Interactive Tools Palette in MQL5"

 

Check out the new article: MQL5 Trading Tools (Part 31): Creating an Interactive Tools Palette in MQL5.

We turn the Tools Palette sidebar from a static shell into an interactive MQL5 system. The article implements flyout menus per category, a chart event handler, a multi-click drawing engine (one-, two-, and three-click tools), and mouse interactions including drag, bottom-edge resize, scrolling, hover states, and live theme toggling. You will be able to select a tool and place chart objects directly from the palette for analysis.

The upgrade introduces three major capabilities. First, flyout menus that appear when you hover a category button, showing the individual tools inside that group with icons, labels, hover highlights, and scroll support for longer lists. Second, a full mouse interaction system that lets you drag the panel by its grip area, resize it from the bottom edge, scroll overflowing categories with the mouse wheel or a thumb pill, toggle the theme on click, and close the panel. Third, a chart drawing engine that translates tool selection into actual chart objects, handling single-click placements like horizontal lines and arrows, two-click placements like trend lines and rectangles, and three-click placements like channels and pitchforks.

On the chart, this means you can hover the lines category, pick a trend line from the flyout, then click two points on the chart to place it. If the sidebar is blocking price action, grab the grip dots and drag it to the opposite edge where it snaps flush. When a category is active, its button shows a blue highlight with an accent bar so you always know which group your current tool belongs to. Resizing the panel from the bottom lets you show fewer categories on smaller screens without losing access to the rest through scrolling.

We will expand the icon definitions and enumerations to cover all thirty-five tools. We will introduce a tool definition structure and rebuild the registry to use dynamic tool arrays. We will also extend the theme color set, add a flyout panel class, build a chart event handler, and implement a multi-click drawing engine. In a nutshell, here is an illustration of what we will be achieving.

TOOLS PALETTE PART 3 ARCHITECTURE GIF

Author: Allan Munene Mutiiria

 
Looks NICE; thx for sharing codes & ideas ; take care