Liquidity Shielded Stop Manager
This is a trade manager, not a signal generator - it opens no positions, only manages ones already open. It trails a protective stop behind confirmed swing points using the same fractal confirmation test as the other trailing tools in this catalogue, then adds one extra check before placing the stop: does the candidate level sit within InpEqualTolerancePips of at least InpMinClusterSize other recently confirmed swing extremes on the same side? A group of several near-equal highs or lows is the visual signature many traders call an "equal highs/equal lows" liquidity pool - an obvious level where a cluster of other market participants' stops are statistically likely to sit, simply because it is an obvious level to place one. If such a cluster is detected, the stop is placed past the cluster's FAR edge (the member furthest from current price) plus a small shield buffer, rather than at the plain structural level, which may sit inside or right at the near edge of the pool. HONEST CONCESSION - read this before relying on the description above: there is no public, verifiable evidence available to this EA, or to the author, that brokers or other market participants deliberately target these clusters, and this tool makes no such claim and cannot prove one either way. What it implements is a real, mechanical, and essentially free precaution that is reasonable regardless of whether deliberate targeting exists at all: a stop placed exactly on a level that plain order-density reasoning says several other stops probably also sit on is, all else equal, a worse place for a stop than one placed just beyond that same cluster. No claim about intent or manipulation is required for that adjustment to be sensible - it is offered here as a cheap structural precaution, not as evidence of, or protection against, any specific market behaviour. Notes and limitations - Read the honest concession above - this is a heuristic precaution, not a proven defence against any specific market behaviour, and the EA makes no claim otherwise. - This EA never opens or closes a position - it only ever tightens an existing stop, exactly like the plain Structure Trailing Stop Manager, with the added cluster check before each trail. - Cluster detection only considers swing extremes confirmed since the EA was attached; it does not scan chart history retroactively. - A cluster tolerance set too wide can merge genuinely distinct levels into one detected pool, which shifts the shielded stop further than the intent of the feature - keep InpEqualTolerancePips modest relative to the symbol's typical swing spacing.
Expert advisor · MT4 · v1.0 · Free
About Liquidity Shielded Stop Manager
Liquidity Shielded Stop Manager is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 9 settings, such as Swing strength, Max tracked and Equal tolerance pips. MQL source code included.
Files in the download: LiquidityShieldedStops.ex4, LiquidityShieldedStops.mq4, LiquidityShieldedStops.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Swing strength | 5 | Bars required on EACH side of a pivot to confirm it as a swing point |
| Max tracked | 40 | Maximum number of recent confirmed swing extremes remembered per side |
| Equal tolerance pips | 3.0 | Two swing extremes within this many pips are treated as the same liquidity level |
| Min cluster size | 2 | Minimum swing extremes at a level before it counts as a liquidity pool |
| Shield buffer pips | 3.0 | Extra distance placed beyond a detected pool's far edge |
| Buffer pips | 2.0 | Normal buffer beyond a lone (non-pooled) swing point |
| Magic number | -1 | Magic number to manage; -1 manages every position on this symbol |
| Max retries | 5 | OrderModify attempts before giving up |
| Retry wait ms | 500 | Pause between retry attempts, milliseconds |
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 → Scripts.
- 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 script onto a chart to run it once.
Tags: Fractals · Buy/Sell Arrows · Trailing Stop & Break-even · Alerts · MT4 Expert Advisor · MQL4 Source Code