Skip to content
All library documents

Monitoring Manually Drawn Trendlines with an MQL5 Expert Advisor

Article MQL5 articles

Summary

This article explains how to combine discretionary chart analysis with automated monitoring in MetaTrader 5. A trader draws trendlines and explicitly synchronizes selected lines with an Expert Advisor, which tracks their changing price as time advances and checks the market price for approaches, touches, breaks, and rejections. The system can report detected events through alerts and a chart panel.

The implementation discussion covers chart object events, reading line properties, tracking object changes and deletions, calculating a trendline’s price, and applying a configurable tolerance to classify interactions. The article describes testing the workflow on a live chart and reports that it detected and displayed interactions. It provides an implementation pattern rather than evidence of trading performance: alerts identify chart events but do not establish profitable entries. Monitoring is limited to synchronized lines, and results depend on the selected price reference and tolerance settings.

Key ideas

  • The trader chooses which manually drawn trendlines the Expert Advisor should monitor.
  • Synchronization registers selected chart objects for continued tracking.
  • The program recalculates each line’s price as time advances and compares it with market price.
  • A configurable tolerance helps classify approaches, touches, breaks, and rejections.
  • The article describes live chart checks but does not demonstrate trading profitability.

Tags

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