Exp_PFE_Extr
This EA trades based on the Polarized Fractal Efficiency (PFE) indicator, opening buy positions when PFE crosses above the upper level and sell positions when it crosses below the lower level. It uses multiple smoothing methods via the CXMA library and supports configurable money management modes including fixed lot and margin-based sizing. The strategy operates as a zero-lag crossover system on extreme PFE level breaches.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Conversion problem |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Conversion problem |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Conversion problem |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Conversion problem |
Why this EA never traded: it compares lines on different scales (an oscillator against a price level).
Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.
Blow-up risk: No blow-up pattern found
None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.
High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →
Strategy analysis
The core strategy is based on the Polarized Fractal Efficiency (PFE) indicator, which measures the efficiency of price movement—positive values indicate high uptrend efficiency and negative values indicate high downtrend efficiency. Entry conditions: open a buy when PFE crosses above UpLevel (+0.5) from below, and open a sell when PFE crosses below DnLevel (-0.5) from above, with SignalBar=1 used to confirm the crossover. Exit conditions include closing long positions when PFE drops below the lower level, closing short positions when PFE rises above the upper level, along with a StopLoss of 1000 points and TakeProfit of 2000 points. Position sizing supports five modes: free margin percentage, balance percentage, loss-adjusted free margin, loss-adjusted balance, and fixed lot, defaulting to fixed lot mode. Signals are evaluated only on new bars to avoid redundant trades, but there is no check for existing positions in the same direction, which may lead to duplicate entries.
Strengths
- Uses PFE indicator with mathematical foundation for trend efficiency rather than purely empirical signals
- Supports multiple smoothing algorithms (JJMA/JurX/ParMA/T3/VIDYA/AMA) allowing flexible signal quality optimization
- NewBar mechanism effectively prevents duplicate signal triggers within the same bar
- Provides 5 position sizing modes offering high flexibility in money management
- Buy and sell directions can be independently enabled/disabled, useful for unidirectional or hedging strategy testing
Weaknesses
- Lacks same-direction position check, potentially opening duplicate positions and causing excessive exposure
- StopLoss of 1000 points and TakeProfit of 2000 points are large, potentially enduring significant drawdowns on H4 timeframe
- No spread filter mechanism, may enter at unfavorable prices during low liquidity or widened spreads
- Depends on custom PFE indicator file—EA fails to initialize if the indicator is missing
- Only reads 2 values from CopyBuffer with minimal error handling when indicator buffer data is insufficient
Possible improvements
- Add same-direction position count check to prevent duplicate entries and over-concentration of positions
- Add spread filter and session time filter to avoid entering during widened spreads or low liquidity periods
Risk assessment
Overall risk: Medium
- Missing same-direction position check may lead to repeated entries during trending markets, accumulating risk
- Large SL/TP values (1000/2000 points) result in high per-trade risk exposure
- No spread filter means slippage costs are uncontrolled during high volatility periods
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio, controls trade lot size |
MMMode | LOT | Lot calculation mode: Fixed lot or margin-based ratio |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Allow buy positions |
SellPosOpen | true | Sell position opening signal mode |
BuyPosClose | true | Allow close buy positions |
SellPosClose | true | Sell position closing signal mode |
InpInd_Timeframe | PERIOD_H4 | CandlesticksBW indicator timeframe |
PfePeriod | 5 | PFE indicator period |
XMA_Method | MODE_JJMA | Smoothing method (SMA/EMA/JJMA, etc.) |
XLength | 5 | Smoothing length |
XPhase | 100 | Smoothing phase parameter, affects JJMA/VIDYA/AMA behavior |
IPC | PRICE_CLOSE_ | Applied price type |
UpLevel | +0.5 | Upper threshold level |
DnLevel | -0.5 | Lower threshold level |
SignalBar | 1 | Signal bar index (0=current, 1=last closed bar) |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.