Levels With Reaction History Labels
Most support/resistance indicators draw a line and leave the trader to judge, from memory, whether it has actually mattered before. This one keeps score. Every level starts from a confirmed swing extreme, and every closed bar since is scanned for whether price traded into a tolerance band around the level (a touch), and whether that touch resolved by closing back outside the band within a configurable window (a hold) or by closing straight through it (a break, not counted as a hold). The label above each level shows the touch count, the hold percentage, and the size of the most recent held reaction expressed in ATR multiples, so "this level has worked three out of four times, most recently for about 1.5x ATR" is readable at a glance instead of inferred. The naive version of this counts every bar inside the tolerance band as a separate touch, which inflates the count whenever price chops sideways against a level for several bars in a row. This version resolves each touch over its reaction window before looking for the next one, so a multi-bar stall against a level counts once, not once per bar. Nearby swings on the same side are merged into a single evolving level rather than drawn as separate overlapping lines, since a cluster of swings within a few bars of each other at similar prices usually represents one structural level being retested, not several distinct ones. Notes and limitations - Touch/hold/break judgement uses closed-bar highs, lows and closes only - it does not see intrabar wicks beyond what the bar's own high/low already records, and it does not use tick data. - A touch that has not resolved (neither held nor broken) within InpReactionWindow bars is still counted toward the touch total but not toward holds, which can understate the hold percentage on a level tested very close to the current bar. - Stats are recomputed from scratch on every call for every tracked level rather than updated incrementally, which keeps them correct after a history reload but means a very large InpMaxLevels on a long-loaded chart can be slower to refresh. - No trade or stop-loss logic - visual and informational only.
Indicator · MT4 · v1.0 · Free
About Levels With Reaction History Labels
Levels With Reaction History Labels is an indicator for MetaTrader 4 based on ATR. It has 9 settings, such as Swing lookback, Max levels and Touch tolerance atr mult. MQL source code included.
Files in the download: LevelsWithReactionHistory.ex4, LevelsWithReactionHistory.mq4, LevelsWithReactionHistory.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Swing lookback | 8 | Bars required on each side to confirm a swing extreme |
| Max levels | 15 | Maximum levels kept and labelled (most recent kept) |
| Touch tolerance atr mult | 0.15 | Touch band width around a level, as a multiple of ATR |
| Atr period | 14 | ATR period used for tolerance and reaction-size scaling |
| Reaction window | 5 | Bars allowed for a touch to resolve as held or broken |
| Min bars between levels | 10 | Merge distance: swings closer than this many bars apart, on the same side, are treated as one level |
| Resistance color | clrOrangeRed | Colour on the chart |
| Support color | clrLime | Colour on the chart |
| Label color | clrWhite | Colour on the chart |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Support & Resistance · ATR · MT4 Indicator · MQL4 Source Code