Skip to content
All library documents

Making MetaTrader Chart Object Resizing Interactive

Article MQL5 articles

Summary

This installment explains how to extend a MetaTrader 5 indicator so a selected chart object can be resized through an outline made from rectangle-label objects. The code stores the target object’s position and dimensions, creates four thin edge objects around it, and uses chart events to create or remove the outline when the user clicks an object or presses Escape. The article points out that the outline itself initially lacks usable interaction points, then makes its edges selectable so MetaTrader can expose drag anchors.

The examples and figures illustrate the interface and reveal practical snags, including overlapping anchors and unexpected behavior during dragging. The supplied text cuts off while discussing that behavior, so the final correction and full resulting interaction are not available here. This is a programming tutorial for chart interaction, rather than a trading strategy; it emphasizes experimentation and cautions against treating demonstration code as a finished application.

Key ideas

  • An outline around a chart object can be built from four thin rectangle-label objects.
  • Chart events can trigger creation and removal of the resizing outline.
  • Selectable outline edges let MetaTrader provide drag anchors for chart interaction.
  • Overlapping anchors and drag behavior create usability issues that require further refinement.
  • The excerpt ends before showing the complete solution to the interaction problems.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.