Loading…

Market Structure Labeller

Reading structure by eye - is this swing higher or lower than the last one of its kind - is easy to get wrong under pressure and easy to disagree with yourself about a week later. This indicator applies one fixed rule: a new confirmed swing high is compared only against the previous confirmed swing high (never a low), and a new confirmed swing low only against the previous confirmed swing low. The result is printed as a text label at the swing: HH, HL, LH or LL. The swing itself uses the same confirmation rule as Fractal Swing Marker elsewhere in this catalogue - a bar whose high (or low) is the most extreme within K bars on both sides. The two indicators share that underlying fractal logic; this one is built directly on top of it, adding the higher/lower classification against swing history. Each file codes the test independently so it can be downloaded and compiled on its own, but they are conceptually the same building block used two different ways. Because a swing cannot be confirmed until K bars have closed on both sides of it, every label is necessarily late by that same K-bar window - this reads recent structure, it does not predict the next swing before it forms. The very first swing high and the very first swing low in the chart's history are deliberately left unlabelled, because there is no earlier swing of the same side to compare against. Notes and limitations - Labels are drawn as chart text objects, not buffer plots, because the text itself (HH/HL/LH/LL) is the output; they are named deterministically from the swing's bar time and side, so recompiling or reloading history never creates duplicates and OnDeinit removes only this indicator's own objects. - The classification only ever compares within one side. A swing low is never judged against the most recent swing high, and vice versa - that is deliberate, not a missing feature. - Every label lags its swing by up to InpK bars, for the same structural reason described above; this is a tool for reading confirmed structure, not for anticipating the next swing. - Raising InpK on a busy lower timeframe both reduces label frequency and increases the confirmation delay - the two move together and cannot be tuned apart.

Indicator · MT5 · v1.0 · Free

About Market Structure Labeller

Market Structure Labeller is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 2 settings, such as K and Alerts. MQL source code included.

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

Settings

SettingDefaultWhat it does
K2Bars required on each side to confirm a swing
AlertstrueAlert when a swing is classified (closed bars only)

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: Alerts · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria