Skip to content
All library documents

Displaying Embedded Indicator Signals as Chart Comments in MQL4

Article MQL5 articles

Summary

This article shows how to calculate built-in MQL4 indicator values and present their interpretations as text on a price chart. Its example compares the Stochastic Oscillator’s main and signal lines to label a possible buy or sell condition, then extends the display to readings from DeMarker, ATR, CCI, and MFI. The chart comments can replace separate indicator panes when a trader wants a compact status display, and line breaks allow several readings to appear together.

The article also notes that indicators may disagree, in which case the absence of a clear signal can itself inform the trader. The examples are descriptive alerts, not a tested trading system: the stated interpretations rely on simple thresholds and do not establish predictive accuracy. The sample program covers the current chart timeframe, though the author says it can be extended to other timeframes and symbols. It also introduces array-based indicator calculations as an option for processing data outside the usual built-in calls.

Key ideas

  • MQL4 built-in functions can retrieve indicator values for a chosen symbol, timeframe, and bar.
  • Comparing Stochastic lines can turn a crossover state into a text alert on the chart.
  • Several indicators can be combined into a compact commentary display.
  • Conflicting readings or no clear reading can be presented as useful context rather than forced into a trade direction.
  • The examples demonstrate signal display logic, not validated trading performance.

Tags

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