Exp_i-SpectrAnalysis_WPR
This EA trades based on a spectral analysis filter applied to the Williams Percent Range (WPR) indicator. It identifies turning points in the smoothed WPR line to generate buy and sell signals, opening and closing positions accordingly with configurable money management and stop-loss/take-profit levels.
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 core concept of this strategy is applying spectral analysis filtering to the WPR (Williams Percent Range) indicator, removing high-frequency noise to extract major trend reversal signals. Entry conditions: a buy position is opened when the filtered WPR value turns from declining to rising (Value[0]>=Value[1] and Value[1]<Value[2]), and a sell position is opened when it turns from rising to declining (Value[0]<=Value[1] and Value[1]>Value[2]). Exit conditions are triggered by opposing signals — long positions close on bearish signals and short positions close on bullish signals, with additional fixed stop-loss and take-profit levels. Position sizing supports five modes: percentage of free margin, percentage of balance, percentage of free margin minus floating loss, percentage of balance minus floating loss, or fixed lot size. Money management is controlled by the MM parameter for trade volume ratio and the MMMode parameter for selecting the specific calculation mode. The strategy uses an IsNewBar mechanism to ensure signals are calculated only once per bar, preventing redundant trades.
Strengths
- Spectral analysis filtering effectively removes high-frequency noise from the WPR indicator, reducing false signals
- Supports multiple money management modes, flexibly adapting to different trading styles
- Uses IsNewBar mechanism to prevent redundant trades within the same bar, ensuring rigorous logic
- Configurable stop-loss and take-profit parameters provide controllable risk
- Buy and sell direction open/close can be independently toggled, offering high flexibility
Weaknesses
- Spectral analysis relies on the custom i-SpectrAnalysis_WPR indicator, creating a black-box dependency with limited transparency
- No check for existing positions in the same direction, potentially leading to duplicate openings
- Default stop-loss of 1000 and take-profit of 2000 points are excessively large for some instruments and timeframes
- No spread filter, which may be disadvantageous in high-spread environments
- Signals rely solely on turning points of a single indicator, lacking multi-dimensional confirmation
Possible improvements
- Add position check logic to avoid duplicate openings in the same direction
- Add spread filter and maximum position count limit to improve risk control
Risk assessment
Overall risk: Medium
- No existing position check in the same direction, potentially leading to repeated openings and overexposure during trending markets
- Default SL/TP values are large and may not be suitable for lower timeframes or low-volatility instruments
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Capital allocation ratio per trade |
MMMode | LOT | Margin mode: free margin/balance/drawdown free margin/drawdown balance/fixed lot |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Allow buy positions |
SellPosOpen | true | Allow sell positions |
BuyPosClose | true | Allow buy position close on reverse signal |
SellPosClose | true | Allow sell position close on reverse signal |
InpInd_Timeframe | PERIOD_H4 | Indicator calculation timeframe |
WPRPeriod | 13 | Williams %R period |
N | 7 | FFT power parameter (data points=2^N) |
SS | 20 | Spectral analysis smoothing strength |
SignalBar | 1 | Signal detection bar index position |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.