Exp_ColorBBCandles
This EA trades based on the ColorBBCandles custom indicator, which uses Bollinger Band deviation levels to classify candle colors. It opens buy positions when the indicator signals an upward bias (value > 5) and sell positions when it signals a downward bias (value < 5), while closing all positions when a flat/neutral signal (value == 5) is detected.
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 | +4.54% | +3.94% | 3.97% | 15 | 42.90% | 0.81 | 1.14 | 3 | +$27.62 | Reliable |
| GBPUSD | -2.15% | -1.87% | 7.87% | 23 | 31.80% | -0.25 | -0.27 | 6 | −$9.08 | Reliable |
| USDJPY | +7.59% | +6.56% | 4.12% | 33 | 50.00% | 1.22 | 1.84 | 4 | +$22.95 | Reliable |
| XAUUSD | +52.33% | +41.59% | 54.28% | 148 | 53.40% | 0.96 | 0.96 | 5 | +$35.36 | Reliable |
Profitable on 3 of 4 markets with reliable results.
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.
Against the other Mean Reversion EAs with a reliable result on the same market: EURUSD: better than 87% of 30 · GBPUSD: better than 41% of 32 · USDJPY: better than 94% of 32 · XAUUSD: better than 74% of 31
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 54% | +2.80% 2026-09 | -1.93% 2026-04 |
| GBPUSD | 31% | +3.76% 2026-02 | -2.84% 2026-01 |
| USDJPY | 77% | +2.74% 2026-03 | -2.36% 2026-01 |
| XAUUSD | 54% | +46.88% 2026-08 | -26.35% 2026-06 |
From the backtest equity curve, sampled about every two days; only reliable results.
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 multi-level classification of Bollinger Band deviation levels, using the ColorBBCandles indicator to categorize candles into bullish, bearish, and flat states. Entry conditions: a buy signal triggers when indicator buffer 4's previous value exceeds 5 and the current value is below 6; a sell signal triggers when the previous value is below 5 and the current value exceeds 4. Exit conditions include fixed stop loss and take profit in points, plus closing all positions when the indicator value equals 5 (flat/neutral market). Position sizing is controlled via the MM parameter, where negative values represent fixed lot sizes and positive values represent deposit-proportional sizing. Money management relies on functions from the included TradeAlgorithms.mqh file, supporting both proportional allocation and fixed lot modes. The strategy uses a multi-timeframe architecture where the indicator can operate on a different timeframe than the chart, defaulting to H4.
Strengths
- Uses multi-level Bollinger Band deviation classification, effectively distinguishing between trending and flat market states
- Supports both deposit-proportional and fixed lot position sizing, offering good flexibility
- Provides independent toggles for buy/sell opening and closing, allowing flexible directional control
- Implements new bar detection to prevent repeated trading within the same bar
- Configurable stop loss and take profit parameters provide a basic risk control framework
Weaknesses
- Signal logic relies on hardcoded thresholds (5, 4, 6) without adaptive mechanisms, requiring re-tuning for different instruments
- Depends on external TradeAlgorithms.mqh file, making it hard to independently audit the complete risk profile
- Default stop loss of 1000 points and take profit of 2000 points are large, potentially creating excessive risk exposure on some instruments
- Lacks spread filter and trading session filter, potentially executing unfavorable trades during low-liquidity or high-spread periods
- Indicator value boundary conditions (Value[1]>5 and Value[0]<6) have ambiguous logic; signals in the 4-6 range may be unstable
Possible improvements
- Make hardcoded signal thresholds (4, 5, 6) configurable input parameters to improve strategy adaptability and tunability
- Add spread filter and trading session filter to avoid entering during high-spread and low-liquidity periods
- Add position check and duplicate order protection to prevent excess positions from network latency or anomalies
Risk assessment
Overall risk: Medium
- Hardcoded signal thresholds may produce false signals under varying market conditions, leading to consecutive losses
- No spread filter may result in unfavorable execution during high-spread periods
- Dependency on external TradeAlgorithms.mqh with unaudited implementation may contain risk vulnerabilities
- Large default SL/TP values may expose unnecessary risk on low-volatility instruments
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | -0.1 | Trade fraction or fixed lot; negative value = lots |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Max price slippage deviation in points |
BuyPosOpen | true | Allow opening long positions |
SellPosOpen | true | Allow opening short positions |
BuyPosClose | true | Allow closing long positions |
SellPosClose | true | Allow closing short positions |
InpInd_Timeframe | PERIOD_H4 | Indicator timeframe |
BandsPeriod | 100 | Bollinger Bands smoothing period |
BandsDeviation1 | 1.0 | First Bollinger Bands deviation value |
MA_Method_ | MODE_EMA | Moving Average method |
IPC | PRICE_CLOSE | Price constant for indicator calculation |
SignalBar | 1 | Bar index for entry signal |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.