Skip to content
All library documents

A Repainting Indicator for Locating Local Price Highs and Lows

Article MQL5 code base

Summary

This MetaTrader indicator marks selected local price tops and bottoms with colored dots. It calculates highs and lows over a configurable period, compares them with the broader trading range, and marks points that meet a significance threshold. The period setting affects how many points appear: longer periods produce fewer marks, while a higher range cutoff adjustment produces more frequent dots. An option controls how many bars are included in the calculation.

The key limitation is that the indicator repaints: previously marked locations can move as new price data arrives. The document explicitly cautions against treating dot appearances as buy or sell signals. It presents the tool as a quick way to identify possible support and resistance areas for breakout analysis or as a component in further indicator development. No performance testing, instrument-specific evidence, or rules for confirming levels are provided.

Key ideas

  • The indicator marks local highs and lows based on their size relative to a recent price range.
  • A longer calculation period results in fewer displayed dots.
  • Changing the range adjustment changes how frequently significant points are marked.
  • The indicator repaints, so historical dot locations can shift as new data arrives.
  • Its suggested use is to locate possible support and resistance areas, not to generate direct trade signals.

Tags

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