Exp_XWPR_Histogram_Vol_Direct
This Expert Advisor trades based on the XWPR (Williams' Percent Range) histogram indicator with volume confirmation and direct signal processing. It enters long positions when the WPR histogram shows bullish momentum supported by volume, and short positions on bearish momentum with volume confirmation, using a direct trading approach without position reversal.
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 is centered on the Williams' Percent Range (WPR) indicator displayed in histogram form, combined with volume filtering to confirm signal validity. Entry conditions are: go long when the WPR histogram crosses above its signal line from negative territory with increasing volume; go short when the histogram crosses below its signal line from positive territory with increasing volume. The EA employs a direct trading mode (Direct), meaning it opens new positions upon signal rather than reversing existing ones. Exit conditions rely on fixed stop loss and take profit parameters, and may include a trailing stop feature to protect accumulated profits. Position sizing is controlled through lot size parameters, supporting either fixed lots or dynamic lot calculation based on account equity percentage. Money management includes maximum position limits and stop loss protection, though the effectiveness of risk controls depends heavily on the reasonableness of parameter configuration.
Strengths
- Volume filtering effectively reduces false signals and improves entry quality
- Direct trading mode has clear logic, avoiding complexity and extra risk from reversal trading
- WPR histogram format is more intuitive than traditional overbought/oversold judgment for signal identification
- Configurable stop loss and take profit parameters provide a basic risk control framework
- Trailing stop feature helps lock in floating profits
Weaknesses
- WPR indicator tends to generate frequent false signals in ranging markets, leading to repeated stop-outs
- Volume confirmation parameters (such as volume multiplier) are difficult to calibrate precisely and adapt poorly to different market conditions
- Lacks new bar check mechanism, potentially opening multiple positions on the same bar
- No spread filter, making stop losses vulnerable to being triggered in high-spread environments
- Strategy logic is relatively simple, lacking multi-timeframe confirmation and market regime detection
Possible improvements
- Add multi-timeframe confirmation, such as executing signals on H1 only after H4 trend direction is confirmed
- Implement market regime detection (trend/range) to automatically pause trading or reduce position size in ranging markets
- Add spread filter and slippage control to avoid opening positions in high-cost environments
Risk assessment
Overall risk: Medium
- Lack of new bar check may cause duplicate position opening on the same bar, increasing risk exposure
- Volume multiplier parameter may fail under different market volatility regimes, leading to incorrect signal judgment
- WPR frequent signal triggers in sideways markets may cause accumulated consecutive small losses
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
InpLots | 0.1 | Trading lot size |
InpStopLoss | 500 | Stop loss in points |
InpTakeProfit | 500 | Take profit in points |
InpTrailingStop | 0 | Minimum trailing stop distance in points |
InpWPRPeriod | 14 | Williams %R period |
InpVolumePeriod | 5 | volumesmoothing period |
InpVolumeFactor | 1.5 | Volume confirmation multiplier factor |
InpTimeframe | H1 | Trading timeframe |
InpMagicNumber | 123456 | EA magic number |
InpMaxPositions | 1 | Maximum simultaneous positions |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.