Skip to content
All library documents

Monitoring Price Crossings of Trend Lines in MetaTrader 5

Article MQL5 code base

Summary

This MetaTrader 5 indicator monitors existing trend lines and reports when price crosses them. It can track manually drawn lines or lines supplied by another tool, but does not create trend lines itself and does not support horizontal lines. Each line has its own crossing counter; the indicator can play sound or display alerts, and it can show the line name and current price on the chart.

The document describes configuration and refresh behavior rather than a trading strategy or evidence of profitability. Users can choose a signal mode, set the check interval and alert count, and supply a WAV sound file. Crossings are checked on a timer, so the interval controls how often the indicator checks rather than enforcing a pause between alerts. Information refreshes after chart or line changes and can also be triggered manually, especially when using automatically generated lines. The notes explain tool behavior and limits but give no guidance on interpreting crossings or managing trades.

Key ideas

  • The indicator detects price crossings of existing trend lines but does not draw the lines itself.
  • It supports manually drawn or externally generated trend lines, not horizontal lines.
  • Each tracked line has its own crossing count, with optional sound or alert output.
  • The timer interval sets how often crossings are checked, so longer intervals may delay detection.
  • Line information refreshes after chart or line changes and can be refreshed manually.

Tags

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