Skip to content
All library documents

MT4 and MT5 Indicator for Displaying Candle Gains and Losses

Article MQL5 code base

Summary

This document describes a MetaTrader indicator that annotates candles with price gains or losses when a configured threshold is exceeded. It reports changes both in points and percentage, with two calculation modes: current close versus open, or current close versus the previous close. Users can set minimum point and percentage thresholds and choose separate display colors for gains and losses.

The indicator is available for both MT4 and MT5. Its settings also limit the number of bars processed; increasing that limit covers more history but can make the indicator lag more. Other inputs control the displayed font and chart-object naming. The document explains configuration and display behavior but provides no trading signal, testing results, or evidence that the annotations improve decisions.

Key ideas

  • The indicator displays candle gains and losses when configured point or percentage thresholds are met.
  • It supports close-to-open and close-to-previous-close calculations.
  • Separate colors can be configured for positive and negative changes.
  • The maximum bar setting controls calculation history, with larger values potentially increasing lag.
  • The document describes display settings but provides no evidence of trading performance.

Tags

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