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 Polarized Fractal Efficiency Trend strategy is a trend-following system for MetaTrader 5 built around a normalized Polarized Fractal Efficiency (PFE) oscillator — a path-geometry indicator that measures how efficiently price is moving in one direction. Originally developed by Hans Hannula, PFE treats a price chart as a physical path drawn on a price-versus-time plane and asks a simple question: of all the ground price actually covered, how much net progress did it make from start to finish? When price marches cleanly in one direction, the straight-line distance nearly equals the path travelled and efficiency reads near 100. When price chops sideways, the path becomes far longer than the net displacement and efficiency collapses toward zero.
The word "polarized" refers to the indicator's sign: a positive reading points to an efficient bullish trend, while a negative reading points to an efficient bearish trend. This makes PFE both a strength gauge and a direction gauge in one bounded, signed number. The strategy uses that dual nature to time entries — it waits for efficiency to build past a threshold before committing to a trade, and it steps aside when efficiency decays and the move turns choppy.
This EA is best understood as a learning tool for traders who want to study momentum and market efficiency rather than a shortcut to results. It is designed for trending conditions on liquid instruments such as EURUSD or XAUUSD (gold) on intraday-to-swing timeframes like M30 through H4. Importantly, this implementation includes a scale-invariant fix that lets the geometry stay meaningful across forex, metals, crypto, and indices without retuning — a detail explained further below. If you are curious about how fractal geometry and trend efficiency translate into concrete entry and exit rules, this strategy is a clear, self-contained example to examine.
How It Works
The strategy computes a normalized PFE value on every completed bar, smooths it, and then acts on threshold crossings. Here is the full logic in plain English:
- Building the oscillator: Over a window of
PfePeriodbars, the strategy compares the straight-line distance between the first and last close against the total length of the zig-zag path price actually walked. To keep the geometry meaningful on low-priced instruments, every one-bar step is normalized by the window's mean absolute close-to-close change — so a typical bar measures about one unit, comparable to the one-bar time step. This normalization is what makes the indicator scale-invariant across EURUSD, XAUUSD, BTCUSD, and index CFDs. - Smoothing: The raw PFE is passed through an exponential moving average (EMA) of length
SmoothPeriodto filter out single-bar whipsaw and produce a steadier signal line. - Long entry — the strategy signals a buy when the smoothed PFE crosses up through the positive
EntryThreshold(for example, rising above +35). This indicates that an efficient bullish trend has taken hold. - Short entry — the strategy signals a sell when the smoothed PFE crosses down through the negative
EntryThreshold(for example, falling below −35), indicating an efficient bearish trend. - Efficiency-collapse exit: If an open position is running and the absolute value of the smoothed PFE falls below
ExitThreshold, the trade is closed early. The interpretation is that the trend has become inefficient and choppy — the original edge is considered gone. SettingExitThresholdto 0 turns this exit off. - Reversal exit: If price flips polarity — the oscillator crosses to the opposite threshold while a trade is open — the strategy closes the current position and may open a fresh one in the new direction on the same bar.
- Stop-loss logic: On every entry, a stop-loss is placed at a distance of
AtrSlMultmultiplied by the current Average True Range (ATR). ATR measures recent volatility, so the stop automatically widens in fast markets and tightens in calm ones. - Take-profit logic: A take-profit target is placed at
AtrTpMulttimes the ATR in the direction of the trade. With the default 2.0 stop and 3.0 target multiples, the built-in reward-to-risk ratio is 1.5 to 1.
The system acts only once per completed bar (the just-closed bar), never on a still-forming candle, which keeps signals stable and avoids repainting. It runs on whatever single timeframe the chart is set to — the timeframe is never hardcoded.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| PfePeriod | 10 | 5 | 40 | Fractal window — the number of bars of price path the efficiency calculation spans. Larger values react more slowly and smooth over minor noise. |
| SmoothPeriod | 5 | 2 | 20 | EMA smoothing length applied to the raw PFE oscillator to reduce single-bar whipsaw. |
| EntryThreshold | 35.0 | 10.0 | 70.0 | Polarity level (0–100) the smoothed PFE must cross to trigger a trade. Higher values demand stronger, more efficient trends before entry. |
| ExitThreshold | 12.0 | 0.0 | 40.0 | Efficiency-collapse exit level — the trade is closed when the absolute PFE falls below this. Set to 0 to disable this exit. |
| AtrPeriod | 14 | 7 | 40 | Averaging window for the ATR used to size stop-loss and take-profit distances. |
| AtrSlMult | 2.0 | 0.5 | 5.0 | Stop-loss distance expressed as a multiple of ATR. |
| AtrTpMult | 3.0 | 0.5 | 8.0 | Take-profit distance expressed as a multiple of ATR. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed trade volume in lots for each position opened. |

Recommended Chart Settings
This strategy was designed with trending intraday-to-swing conditions in mind. The most natural fit is a liquid forex or metals instrument such as EURUSD or XAUUSD (gold) on the M30 to H4 timeframes. Because the PFE calculation is normalized for scale, the same defaults are intended to remain sensible on other instruments — including crypto pairs like BTCUSD and index CFDs — without retuning the thresholds.
Keep in mind that these are starting points for study, not fixed recommendations. Trend-following logic behaves very differently across ranging versus trending regimes, and results will vary considerably with the symbol, timeframe, spread, and broker conditions you test. Always validate any settings on your own data and account conditions before drawing conclusions.
How to Install on MetaTrader 5
- Download the
.ex5file 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
Like every strategy, the Polarized Fractal Efficiency Trend approach has clear strengths and equally clear limitations, and it is worth weighing both honestly.
Strengths. The core idea is elegant and self-documenting: efficiency is measured directly from price geometry rather than borrowed from a lagging moving-average crossover. Because the oscillator is bounded and signed, entries and exits are easy to reason about. The scale-invariant normalization is a genuine practical advantage — many textbook PFE implementations pin to ±100 on forex because they mix tiny price steps with a time unit of one, and this version corrects that. ATR-based stops and targets also mean the risk framework adapts to volatility automatically.
Limitations. PFE is fundamentally a momentum and trend-efficiency tool, so it is most at home when markets actually trend. In prolonged ranges or choppy, news-driven conditions, threshold crossings can occur without a durable move behind them, leading to entries that the efficiency-collapse exit must clean up — often at a small loss. The reversal logic can also whipsaw when price oscillates around the threshold band. As with any single-indicator system, it carries no awareness of higher-timeframe context, fundamental events, or session liquidity. It may underperform during low-volatility consolidations, around major economic releases, and in markets that grind sideways for extended periods. Treat it as one lens on price behavior, not a complete trading plan.
Risk Management Tips
Regardless of the strategy, disciplined risk management is what separates sustainable study from costly mistakes. Consider the following general principles:
- Position sizing: Size each trade so that a stop-out costs only a small, predefined fraction of your account. A common educational guideline is to risk no more than 1–2% of account equity per trade.
- Test on a demo account first: Run the EA on a demo or simulated account until you understand its behavior across different market conditions before considering any live capital.
- Understand drawdown: Every trend-following system endures losing streaks during ranging markets. Know the maximum drawdown you are willing to tolerate and how it aligns with your risk appetite.
- Diversify and avoid over-leverage: Concentrating too much capital or leverage into a single strategy or instrument magnifies both good and bad outcomes.
- Review regularly: Markets evolve. Periodically re-examine whether the parameters and instrument still suit current conditions rather than assuming past behavior will persist.
Used this way, the strategy becomes a structured way to learn how trend efficiency, thresholds, and volatility-based stops interact — which is its most valuable purpose.
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: PolarizedFractalEfficiencyTrend.ex5 (33 downloads)
- Source Code: PolarizedFractalEfficiencyTrend.mq5 (36 downloads)
- Documentation: PolarizedFractalEfficiencyTrend.pdf (41 downloads)