Exp_PFE
This EA trades based on the Polarized Fractal Efficiency (PFE) indicator, entering long when PFE rises and short when PFE falls. It uses the CXMA smoothing library for signal generation and supports configurable money management modes including lot-based and percentage-based position sizing. The EA operates on a new bar basis with separate controls for opening and closing positions.
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 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
Why this EA never traded: no entry rule survived the conversion.
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 strategy concept is based on the Polarized Fractal Efficiency (PFE) indicator, which measures the fractal efficiency of price movement—higher values indicate a stronger, more efficient trend. Entry conditions: a long position is opened when the previous PFE value is less than the one before it (uptrend forming) and the current value exceeds the previous one (momentum accelerating); a short position is opened when the opposite conditions hold. Exit conditions rely on fixed StopLoss and TakeProfit values in points, with additional trend-reversal closes where a long is closed when PFE turns down and vice versa. Position sizing is controlled by the MM parameter specifying risk percentage, while MMMode selects from five money management modes: free margin percentage, balance percentage, loss-adjusted free margin, loss-adjusted balance, and fixed lot size. Signals are computed only on new bars to prevent repeated tick-level entries, though setting SignalBar to zero triggers per-tick signal recalculation which could increase trade frequency undesirably.
Strengths
- New bar detection mechanism prevents repeated position opening within the same bar, reducing overtrading risk
- Independent control for open and close operations in both directions provides high flexibility
- Explicit StopLoss and TakeProfit with a 1:2 risk-reward ratio characteristic of positive expectancy systems
- Supports multiple smoothing algorithms and price types, offering high parameterization for optimization
- Comprehensive money management modes covering fixed lot to various percentage-based approaches
Weaknesses
- When SignalBar=0, signals are recalculated on every tick which may cause excessive trading and over-positioning
- No spread filter means trades can be opened during high-spread conditions where StopLoss is more easily triggered
- Depends on the custom PFE indicator file; if missing, the EA fails to initialize
- No check for existing positions in the same direction, potentially leading to duplicate entries
- Fixed-point StopLoss and TakeProfit lack ATR-based dynamic adaptation to varying volatility regimes
Possible improvements
- Add position direction checking to prevent duplicate entries that over-concentrate risk in one direction
- Implement ATR-based dynamic StopLoss and TakeProfit for better adaptation across different volatility environments
- Add spread filter and session/time filter to avoid trading during low-liquidity or high-spread periods
Risk assessment
Overall risk: Medium
- Setting SignalBar=0 triggers signal recalculation on every tick, potentially leading to overtrading
- Lack of same-direction position checking may cause duplicate entries and excessive position accumulation
- Fixed StopLoss/TakeProfit does not adapt to volatility changes—too wide in low volatility, too narrow in high volatility
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 slippage deviation |
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 |
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.