Loading…

Equal Highs And Lows

Equal highs and equal lows are resting-stop pools: price tends to be drawn back to them and then swept through. Spotting them by eye means scanning the chart for extremes that line up closely enough to matter, which is exactly the kind of pattern-matching this indicator automates. Each confirmed 5-bar fractal extreme is tested against every existing cluster on its side (highs against highs, lows against lows). If it falls within tolerance of one, it joins that cluster and the cluster's representative price is updated as a running average of its members, keeping the level centred as more touches confirm it. A cluster is only drawn once it reaches InpMinClusterCount members - a single pivot is not yet "equal" to anything. Tolerance defaults to a fraction of ATR rather than a fixed point count, because "equal" on a 5-digit EURUSD chart and on XAUUSD are not the same number of points, and a fixed number would be too tight on one and too loose on the other. The ATR used for each pivot is read at the time that pivot actually formed, not the indicator's current ATR - so a cluster's tolerance reflects the volatility conditions when its members printed, not today's. Notes and limitations - Swings are confirmed 5-bar fractals, known two bars after the extreme once both confirming bars have closed - a cluster's most recent member is always at least two bars old when it is registered. - A cluster is invisible until it reaches InpMinClusterCount members; a lone pivot with no matching neighbour yet is never drawn. - The representative price of a cluster is a running average, so it can shift slightly as new members join, even though already-drawn segments are redrawn to the updated level rather than left at the original touch. - Tolerance is frozen per pivot at the ATR reading from when that pivot formed - a cluster built during a volatile period and one built during a quiet one are not held to the same absolute tolerance. - No trade or stop-loss logic - visual and alerting only.

Indicator · MT5 · v1.0 · Free

About Equal Highs And Lows

Equal Highs And Lows is an indicator for MetaTrader 5 based on ATR. It can alert you with a pop-up, sound, email or push message. It has 8 settings, such as Alerts, Min cluster count and Tolerance points. MQL source code included.

Files in the download: EqualHighsLows.ex5, EqualHighsLows.mq5, EqualHighsLows.txt.

Settings

SettingDefaultWhat it does
AlertstrueAlert when a cluster first qualifies
Min cluster count2Minimum pivots to draw a level
Tolerance points0Cluster tolerance, points (0 = auto from ATR)
Atr period14ATR period used for the auto tolerance
Atr fraction0.10Auto tolerance = ATR * this fraction
High colorclrOrangeRedEqual-highs segment colour
Low colorclrLimeGreenEqual-lows segment colour
Line width2Segment width

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Fractals · Alerts · ATR · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria