Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.
What Is This Strategy?
The Low Friction Trend Pullback is a trend-continuation strategy for MetaTrader 5 whose defining feature is a market-friction regime filter built on the Corwin & Schultz (2012, Journal of Finance) high-low effective bid-ask spread estimator. In plain terms, "friction" here means the effective spread — the hidden cost of transacting — and this strategy estimates it directly from the price bars themselves, then only trades when that estimated friction is low relative to its own recent history.
Most pullback systems combine a trend filter with a re-entry trigger and stop there. This one adds a third, less common layer: a statistical read on how liquid and orderly the tape currently is. The economic premise is that durable currency trends tend to advance in calm, liquid conditions where the effective spread is small, while spikes in that estimated spread often signal stressed or illiquid conditions in which continuation attempts whipsaw. By restricting entries to the lower part of the friction distribution, the strategy aims to sidestep the choppiest phases — which is where its designers intend the reduced drawdown to come from.
As a learning tool, this strategy is well suited to intermediate traders who already understand moving-average trend filters and ATR-based risk, and who want to explore a more research-oriented microstructure concept. It is a strategy analysis exercise, not a profit opportunity — the value is in understanding how a liquidity-cost estimate can be repurposed as an entry gate.
How It Works
The strategy processes one closed bar at a time on a single primary timeframe. It never uses tick volume — everything is derived from open, high, low, and close prices. On each newly closed bar it rebuilds its indicators and then checks a chain of conditions.
Trend direction (the regime it will trade with):
- An Exponential Moving Average (EMA) of the close is maintained over
EmaPeriodbars. - The slope of that EMA over
SlopeLookbackbars is measured and divided by the current ATR (Average True Range) to make it scale-independent. - If this ATR-normalized slope is at or above
SlopeThreshAtr, the trend is considered up; at or below the negative of it, down. If neither, the strategy stands aside.
The friction gate (the strategy's signature filter):
- For every consecutive pair of bars, the Corwin-Schultz estimator recovers an effective spread from the two bars' high-low ranges. It compares the sum of each bar's squared log-range (
beta) against the squared log-range of the combined two-bar high-low window (gamma) to back out an implied spreadS. Negative results are clamped to zero. - The raw spread series is smoothed with a trailing mean over
SpreadWindowbars. - The strategy then computes the
SpreadPercentilepercentile of the smoothed spread over the lastSpreadRankWindowbars. Only when the current smoothed spread sits at or below that percentile — i.e. in the lower, low-friction part of its own recent distribution — is the gate open.
The pullback trigger:
- For a long, the strategy signals when the prior close was below the EMA and the current close has reclaimed it (crossed back above). For a short, the mirror image — the prior close above the EMA and the current close back below.
- An entry fires only when the trend direction, the low-friction gate, and the with-trend reclaim all agree. Only one position is held at a time.
Stop-loss and take-profit:
- The stop distance is
AtrStopMult × ATRfrom entry. The take-profit is placed atRewardRiskmultiples of that stop distance, giving a fixed reward-to-risk ratio.
Trade management (breakeven then trail):
- Once an open trade has gained
BreakevenAtr × ATR, the stop is moved to the entry price to lock out loss. - Beyond that point, an ATR trailing stop follows price at
TrailAtrMult × ATR, ratcheting only in the favorable direction. Negligible adjustments below a small step are ignored to avoid needless broker modifications.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| EmaPeriod | 34 | 10 | 90 | Period of the trend EMA that the price pulls back to and reclaims. |
| SlopeLookback | 12 | 4 | 40 | Number of bars used to measure the EMA slope for trend direction. |
| SlopeThreshAtr | 0.50 | 0.0 | 3.0 | Minimum absolute EMA slope, in ATR units, required to call a trend. |
| SpreadWindow | 10 | 3 | 30 | Trailing window used to smooth the raw Corwin-Schultz spread. |
| SpreadRankWindow | 60 | 20 | 200 | Lookback over which the spread's percentile distribution is measured. |
| SpreadPercentile | 0.50 | 0.15 | 0.85 | Low-friction percentile gate; entries need spread at or below this rank. |
| AtrPeriod | 14 | 5 | 40 | Period of the ATR (simple mean of True Range) used for risk sizing. |
| AtrStopMult | 2.0 | 0.5 | 5.0 | Stop-loss distance as a multiple of ATR. |
| RewardRisk | 1.8 | 0.5 | 5.0 | Take-profit distance as a multiple of the stop distance. |
| BreakevenAtr | 1.0 | 0.2 | 3.0 | Gain in ATR units before the stop is moved to breakeven and trailing begins. |
| TrailAtrMult | 1.5 | 0.5 | 4.0 | ATR trailing-stop distance once the trade is in profit. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed trade size in lots. |

Recommended Chart Settings
This strategy was designed to run on a single primary timeframe with no multi-timeframe dependencies. Major FX pairs on intraday timeframes such as the H1 (1-hour) chart are a reasonable starting point for study, because the Corwin-Schultz estimator behaves most predictably on liquid instruments with clean high-low data, and trend-pullback logic benefits from having enough bars per session to form and reclaim a moving average.
The default EmaPeriod of 34 and SpreadRankWindow of 60 imply the strategy needs a healthy history of closed bars before it will trade — it will stand aside until enough data has accumulated to build a meaningful friction distribution. As always, behavior will vary considerably across different symbols, timeframes, and market conditions, so treat any single configuration as a hypothesis to be tested rather than a setting to trust blindly.
How to Install on MetaTrader 5
- Download the .ex5 file from the link below
- Copy it to your MT5
MQL5\Expertsfolder - Restart MetaTrader 5 or refresh the Navigator panel
- Drag the EA onto a chart matching the recommended symbol and timeframe
- Configure the input parameters and enable Algo Trading
What to Consider Before Using This EA
Strengths of the approach. The stand-out idea is treating liquidity cost as a tradable regime signal. Because the Corwin-Schultz estimator needs no volume data, it works on any clean OHLC feed, and the percentile gate makes it robust to the absolute scale of a given instrument — a spread that counts as "low" for one pair is judged only against that pair's own recent history. Combined with a disciplined ATR stop, a fixed reward-to-risk target, and a breakeven-then-trail management routine, the design is internally coherent and clearly oriented toward keeping losing trades small.
Known limitations. The Corwin-Schultz estimator is an approximation of the effective spread, derived under assumptions that real markets violate — gaps, overnight rolls, and thin sessions can distort the two-bar range calculation and produce misleading friction readings. The percentile gate is only as meaningful as the window behind it: in a persistently calm or persistently stressed market, "low relative to recent history" may not mean "genuinely low." Like all pullback-reclaim systems, it can be caught by false reclaims that immediately reverse, and like all trend filters, it will lag at genuine turning points.
Where it may underperform. In choppy, directionless ranges the EMA slope filter should keep it flat, but during volatile trend transitions the friction estimate can stay low while price still whipsaws, producing losing entries. Illiquid pairs, exotic crosses, and news-driven spikes are the conditions most likely to stress the estimator. This is a tool for studying regime-aware entry timing — not a set-and-forget system.
Risk Management Tips
Sound risk management matters more than any single indicator. A few general principles worth internalizing:
- Risk a small, fixed fraction per trade. Many educators suggest limiting exposure to roughly 1–2% of account equity on any single position, sizing your lots to that risk rather than using a fixed lot blindly.
- Test on a demo account first. Run the strategy in a simulated environment across varied market conditions before committing real capital, and study why it wins and loses, not just the net result.
- Understand drawdown. Even a well-behaved strategy will string together losing trades. Know the largest historical drawdown you are prepared to tolerate and confirm it aligns with your temperament and capital.
- Account for costs. Spreads, commissions, swaps, and slippage all erode results — ironically relevant for a strategy built around spread estimation. Include realistic costs in any evaluation.
- Never over-leverage. Leverage magnifies both gains and losses; use it conservatively and only when you fully understand the downside.
Risk Warning
Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.
Downloads
- Expert Advisor: LowFrictionTrendPullback.ex5 (19 downloads)
- Source Code: LowFrictionTrendPullback.mq5 (21 downloads)
- Documentation: LowFrictionTrendPullback.pdf (24 downloads)