An Expert Advisor (EA) is different from every other download on this site — an indicator only plots or alerts, while an EA actually sends orders on your behalf. This free EA trades a breakout strategy built around BW MFI's Squat zone — heavy trading volume with almost no price movement — on the theory that a Squat bar represents pent-up energy that tends to release as a breakout on the very next bar.
How the Strategy Works
As the BW MFI lesson explains, a Squat bar is one where MFI falls (price range shrinks relative to volume) while Volume rises compared to the bar before it — a lot of trading activity producing very little price movement. BW MFI's other three zones (Green, Fade, Fake) describe an ongoing move without a specific directional trigger, but Squat is different: it flags a bar where the market did a great deal of work without moving, which frequently precedes a sharp move once that pressure finally resolves.
This EA checks, on every new bar, whether the bar from two positions back was a Squat bar. If it was, the EA looks at whether the very next bar's close — the bar immediately after the Squat bar — closed beyond that Squat bar's own high or low. A close above the Squat bar's high triggers a BUY; a close below its low triggers a SELL. If neither happens on that specific following bar, the setup is not traded — there's no persistent memory of older Squat bars, which keeps the logic simple and the breakout level always freshly relevant rather than stale.
Stop Loss, Take Profit, and Position Sizing
A Squat bar's own range is exactly the kind of level this EA is designed not to lean on for its stop — by definition, a Squat bar has an unusually small range for the volume behind it, so using that bar's high or low as a Stop Loss anchor (the way the Fractals Breakout EA uses a broken fractal level) would often place the stop uncomfortably close to the entry, especially on pairs or timeframes where Squat bars compress tightly. Instead, this EA sizes its Stop Loss from ATR: ATRMultiplier × ATR (default multiplier 2.0), recalculated fresh at the moment each trade opens, so the stop reflects the pair's actual recent volatility rather than the unusually tight range of the specific bar that triggered the setup. Take Profit is set at RiskRewardRatio × that Stop Loss distance (default 2.0).
Position size follows the same worked-example method taught in Risk Management Basics: a RiskPercent of account balance (default 1.0%) divided by the ATR-based Stop Loss distance, converted through the symbol's tick value and normalized to the broker's lot step. A UseFixedLot input with a FixedLotSize value is available as an escape hatch for traders who'd rather trade a constant lot size regardless of risk.
Entry Conditions
- BUY — the bar two positions back was classified as Squat (MFI down, Volume up versus the bar before it), and the most recently completed bar's close is above that Squat bar's high.
- SELL — the bar two positions back was classified as Squat, and the most recently completed bar's close is below that Squat bar's low.
The EA evaluates these conditions once per new bar only, tracked against the time of the current bar's open, never on every tick, so a single Squat bar can't trigger multiple trade attempts across several bars — only the one bar directly following it is ever checked. It opens at most one position at a time, counted and filtered by its own magic number (MagicNumber, default 20260802), so it never confuses a position it opened with one you opened manually or one belonging to a different EA on the same account. Before opening anything, it also checks the current spread against MaxSpreadPoints and skips the entry entirely if the market is too illiquid at that moment.
Parameters
- ATRPeriod (default 14) — the lookback window for the Stop Loss volatility measurement.
- ATRMultiplier (default 2.0) — Stop Loss distance = ATR × this multiplier.
- RiskRewardRatio (default 2.0) — Take Profit distance = Stop Loss distance × this ratio.
- RiskPercent (default 1.0) — percentage of account balance risked per trade, used to calculate lot size. Ignored if
UseFixedLotis enabled. - UseFixedLot / FixedLotSize — trade a constant lot size instead of risk-based sizing.
- MaxSpreadPoints (default 30) — skips new entries while the spread is wider than this, the concern covered in Spread and Slippage.
- MagicNumber (default 20260802) — tags every order this EA places so its position-counting and management logic never touches trades opened manually or by a different EA.
- EnableTrading — a master on/off switch, useful for pausing the EA without removing it from the chart.
Notice what's missing compared to most oscillator-based EAs on this site: there's no lookback period to tune for the Squat detection itself, since (as the BW MFI lesson explains) each bar's zone is determined purely by comparing it to the single bar immediately before it, with no moving average or smoothing period involved anywhere in the calculation.
Why This EA Only Trades the Very Next Bar
It's worth being explicit about a design choice that differs from this site's other breakout EAs: the Fractals Breakout EA keeps a stored fractal level in memory and can trade a breakout of it many bars later, but this EA deliberately only checks the single bar immediately following a Squat bar, with no persistent memory of older Squat bars at all. The reasoning is specific to what a Squat bar actually represents: it's a snapshot of unusually high effort producing unusually little result on one particular bar, and the market's reaction to that imbalance — if there is one — tends to show up quickly, often on the very next bar, while the pressure that built up is still fresh. A Squat bar from ten bars ago says very little about the present moment, since plenty of ordinary price action has happened since. Waiting for a stale Squat level and trading a breakout of it much later would be treating old, likely-irrelevant information as if it were still live, which is a different (and considerably weaker) signal than the one this strategy is actually built to trade.
Installation and Setup
EAs install into a different folder than indicators — this is the step people miss most often.
- Download the file below for your platform.
- Open MetaTrader → click
File→Open Data Folder. - Place the file in
MQL4/Experts(MetaTrader 4) orMQL5/Experts(MetaTrader 5) — not the Indicators folder. - Restart MetaTrader, then drag the EA from the Navigator window onto a chart.
- Enable AutoTrading (MT4) or Algo Trading (MT5) in the toolbar — the EA will not place any trades while this is off, even if it's attached to a chart.
- Review and adjust the input parameters in the EA's settings dialog before confirming.
A Word of Caution
Test on a demo account first, across different market conditions, before risking real money — past performance, in backtests or live, never guarantees future results. No strategy, automated or manual, wins every trade, and this EA can and will lose money on individual trades. A Squat bar raises the odds of a breakout, but plenty of Squat bars simply resolve into another quiet bar with no meaningful follow-through, especially in a market that's genuinely range-bound rather than compressing before a real move — this EA has no way to distinguish a Squat bar that precedes a genuine breakout from one that doesn't, since both look identical at the moment they form. Remember the forex tick-volume caveat covered in the BW MFI lesson as well: what this strategy calls "Volume" is tick volume, a proxy for trading activity, not literal traded volume, and it varies from broker to broker. Both files are source code — open and review them fully, and understand what every parameter does, before using it. This content is general education, not personalized investment advice.
Download the EA
How to Install — MetaTrader 4
- Download the
market-facilitation-squat-breakout-ea.mq4file below. - Open MetaTrader 4 → click
File→Open Data Folder. - Place the file in the
MQL4/Expertsfolder. - Restart MetaTrader 4, then drag the EA from the Navigator window onto the chart.
How to Install — MetaTrader 5
- Download the
market-facilitation-squat-breakout-ea.mq5file below. - Open MetaTrader 5 → click
File→Open Data Folder. - Place the file in the
MQL5/Expertsfolder. - Restart MetaTrader 5, then drag the EA from the Navigator window onto the chart.
Both files are source code — open and review the full code before using it, for your own safety.