Exp_XDPO_Histogram
This EA trades based on the XDPO_Histogram custom indicator, which is a detrended price oscillator. It opens buy positions when the histogram turns upward from a declining state and sell positions when it turns downward from a rising state, implementing a mean-reversion oscillator strategy.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
Not backtested yet — this EA could not be converted automatically.
Strategy analysis
The strategy concept is based on the Detrended Price Oscillator (XDPO), which applies dual smoothing to price data to identify price deviations from the mean. Entry conditions: a buy is triggered when the previous histogram value is below the prior value (declining) and the current value rises above the previous value (starting to ascend); a sell is triggered when the previous value exceeds the prior value (rising) and the current value drops below the previous value (starting to descend). Exit conditions: long positions are closed when a sell signal appears and short positions are closed when a buy signal appears, complemented by configurable stop-loss and take-profit levels. Position sizing is controlled via the MM parameter and MMMode enumeration, supporting free margin, balance, loss-free-margin, loss-balance, or fixed lot modes. Money management leverages functions from TradeAlgorithms.mqh, providing flexible capital allocation schemes. The strategy relies on two layers of smoothing algorithms: the first smooths the price (default SMA period 12) and the second smooths the oscillator signal (default JJMA period 5), with Phase parameters controlling the sensitivity of JJMA/VIDYA/AMA algorithms.
Strengths
- Dual smoothing algorithm effectively filters noise, providing higher quality signals
- Supports 9 smoothing methods and 9 applied price types, offering high parameter flexibility
- Built-in stop-loss, take-profit, and slippage control provide basic risk management
- Buy/sell open and close can be independently toggled, facilitating strategy combination and testing
- New bar detection mechanism prevents duplicate signals on the same bar
Weaknesses
- Default stop-loss of 1000 and take-profit of 2000 points are excessively large, risking significant per-trade losses
- Lacks position checking mechanism; no verification of existing same-direction positions may cause duplicate entries
- No spread filter; oscillator-based strategies are vulnerable to slippage in high-spread environments
- Depends on the custom indicator file XDPO_Histogram; missing file prevents the EA from running
- SignalBar=1 is default but trading can still trigger on non-new-bar conditions, posing potential duplicate entry risk
Possible improvements
- Add position checking logic to prevent duplicate same-direction entries
- Add spread filter and trading session filter to reduce trading under unfavorable conditions
Risk assessment
Overall risk: Medium
- No position check may lead to duplicate same-direction entries
- Default 1000-point stop-loss is large, resulting in high per-trade risk
- Oscillator strategy may sustain consecutive counter-trend losses during trending markets
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio or lot size, meaning per MMMode |
MMMode | LOT | Position sizing (free margin/balance/fixed lot, etc.) |
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 closing buy positions on reverse signal |
SellPosClose | true | Allow closing sell positions on reverse signal |
InpInd_Timeframe | PERIOD_H4 | NRTR_extr indicator timeframe |
MA_Method1 | MODE_SMA_ | First smoothing method |
Length1 | 12 | First smoothing period |
Phase1 | 15 | First smoothing phase parameter |
MA_Method2 | MODE_JJMA | Second smoothing method |
Length2 | 5 | Second smoothing period |
Phase2 | 15 | Second smoothing phase parameter |
IPC | PRICE_CLOSE_ | Applied price type |
SignalBar | 1 | Signal reference bar index |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.