A Descriptor-Driven Property Ribbon for Editing MQL5 Chart Objects
Summary
The article describes adding a floating ribbon to an MQL5 canvas drawing layer so users can edit selected objects after placement. It replaces separate custom panels for each drawing tool with property descriptors: each entry identifies the property, its widget type, display label, range or options, and where it appears. A shared renderer and engine get/set interface then connect controls to object fields.
The design includes controls for colors, line widths and styles, text, numeric values, booleans, and per-level settings. Snapshot and restore support live previews while allowing cancellation to revert edits. The ribbon follows the current selection and provides compact controls and actions. The article focuses on software architecture and interface implementation; it does not present trading signals, performance tests, or market evidence. Its account of the implementation is incomplete in the supplied text, and the full tabbed settings window is deferred to a later installment.
Key ideas
- A property descriptor lets each drawing tool declare editable fields without requiring a dedicated panel.
- A generic widget layer renders controls according to each descriptor’s type.
- An engine get/set interface maps property IDs to fields on the selected object.
- Snapshots allow live previews to be reverted when the user cancels editing.
- The ribbon exposes compact controls for the selected object, while a fuller settings window is planned separately.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.