RCEGold
- 专家
- 版本: 1.20
- 激活: 5
RCEGold_M — Regression Channel Edge
RCEGold_M is a trend-following Expert Advisor for GOLD (XAUUSD) on M5. It waits for the higher timeframe to prove a trend, then takes one trade per day when a closed M5 bar breaks the edge of a least-squares regression channel in that direction. Every position is opened with a stop loss and a take profit. There is no grid, no martingale, no averaging down and no hedge-recovery cycle.
Most of the time it does nothing. Over 8.8 years that is about 75 trades per year.
How the logic works
- Regime filter (H4). The slope of an H4 EMA(50) over the last 6 H4 bars (24 hours) and the position of price relative to it decide the regime. If the slope is below 0.15% the market is treated as a range and the EA stays out. No trend, no trade.
- Signal (M5). A least-squares regression channel is fitted to the last 228 M5 bars (19 hours). The half width is the largest residual from the fitted centre line, so the band adapts to the current range instead of using a fixed pip distance. An entry needs a closed bar to break the band edge in the H4 direction.
- Breakout quality. Overextended breakouts are not chased: if price is already more than 30% of the channel width beyond the edge, the trade is skipped. This is the single most important countermeasure for the hit rate.
- Exit. SL = channel width x 0.45, TP = channel width x 0.75. The break-even hit rate is therefore 37.5%, and the measured hit rate is 42.9%. That small edge, repeated about 75 times a year, is the entire system.
- Position size. Risk is 1.0% of the initial balance per trade, with total held risk capped at 2.0%. On GOLD, 0.01 lots = 1 oz, so the lot is derived from the balance, the risk % and the SL distance. Small accounts round up to the 0.01 minimum only when the calculated lot is below it.
- Protection. Entries stop at an 18% equity drawdown (resume after 10 days), risk is halved at a 10% drawdown, and while scaled down only one entry every 3 days is allowed. A 3-loss streak pauses trading for 2 hours. A spread above 80 points and Friday after 21:00 server time are skipped.
Verified results (USD account, EA defaults)
| Deposit | Net profit | Return | Trades | Win rate | Profit factor | Max DD (equity) |
|---|---|---|---|---|---|---|
| 1,000 USD | +1,566.50 | +156.7% | 629 | 43.4% | 1.3203 | 11.42% |
| 1,500 USD | +1,584.48 | +105.6% | 662 | 42.9% | 1.2465 | 14.58% |
| 3,000 USD | +2,242.99 | +74.8% | 639 | 43.3% | 1.2299 | 9.35% |
| 5,000 USD | +3,578.47 | +71.6% | 624 | 43.6% | 1.2437 | 9.75% |
Aggregate of the four runs: median +90.2%, mean +102.2%, positive 4 of 4, worst +71.6%, best +156.7%, mean drawdown 11.28%, maximum drawdown 14.58%.
Consistency check: on a same-size JPY account (300,000 JPY) the identical settings returned +104.6% with a 13.84% drawdown, matching the 1,500 USD result. Recent window 2022.01.03 – 2026.10.29 (JPY 300,000): +304,546 JPY / +101.5% / 487 trades / win rate 44.1% / PF 1.320 / max DD 7.49%.
Recommended deposit: from 1,500 USD, 3,000 USD for comfortable headroom. At 1,000 USD the return percentage is higher only because the round-up to the 0.01 minimum lot makes the effective risk exceed 1% — smaller deposits are the more aggressive configuration, not the safer one.
Trading style and holding time
Day trading with occasional short swing holds. On 697 trades over nine years: median holding time 4.13 hours, mean 11.46 hours, 74.2% closed the same day, 89.4% within 24 hours, longest 11 days. 10.6% are carried overnight, which is why the style is not a pure intraday system. There is no time based exit, because the measurements showed that cutting positions early removes the profit (trades under 4 hours total -111,189 JPY, everything above 4 hours is positive).
Requirements
- GOLD or XAUUSD, chart timeframe M5 (the EA reads M5 internally; attaching it to other timeframes does not change a single trade, only the report's Sharpe ratio)
- 0.01 lots = 1 oz, contract size 100, volume step 0.01, market execution
- Netting and hedging accounts are both supported (hedging recommended)
- No DLL, no external authentication, no WebRequest URL — nothing to configure beyond attaching it
- Build compiled for AVX2: a CPU with AVX2 support is required
- VPS recommended; the EA should run continuously
What makes this different
The settings are not the result of a parameter hunt. 16 alternative ideas were built, measured and rejected against the baseline: ATR based SL/TP geometry, TP 1.00, TP 0.60, SL 0.35, a 96-bar maximum holding time, ACE-style trailing, a breakout margin of 0.10, a flatter H4 slope threshold, a 120-bar channel, a high-volatility filter, a session block, a different lot rounding mode, a 1.0% realised-loss cap, multiple entries per day, removing the position cap, and a 2-loss pause. None of them beat the baseline. Ideas that raise the win rate (trailing, touch confirmation, loss caps) all lowered the expectancy; defensive ideas were cancelled out by lost opportunity.
Honest limitations — please read
- This EA needs a trend. On ten one-year zero-drift synthetic markets the same settings returned a median of -5.96%, positive in only 2 of 10, with a 19.88% drawdown. In a market without direction it does not have an edge. If you expect a sideways market, do not buy it.
- The verified period includes GOLD rising from the high 1,800s in 2018 to around 4,000 in 2026. The design is trend following only, so results without that tailwind are not guaranteed.
- The win rate is 42.9%. Expect long sequences of losses (the maximum measured streak is 9). Trading a 37.5% break-even system requires patience and a position size you can live with.
- One backtest is one historical path. It is not proof of future profit.
- Results depend on the broker's spread, execution and server time.
Settings
Run it with the defaults. Two .set files are provided:
- RCEGold_Standard.set — identical to the EA defaults (reference / reset)
- RCEGold_LowDD.set — stop 10% / shrink 6% instead of 18% / 10%. On 300,000 JPY it produces +313,225 JPY / 677 trades / PF 1.2649 with a 10.39% drawdown instead of 13.84%, for essentially the same profit.
Lowering InpEntRiskPct is not an effective way to reduce drawdown: on small and medium accounts the calculated lot falls below the 0.01 minimum and is rounded back up, so the real size barely changes.
Disclaimer
This EA implements a trading logic; it does not guarantee profit. All published numbers are backtest results under the conditions stated above and do not indicate future performance. Sudden market moves, spread widening and slippage can cause losses larger than expected, and a declining margin level can trigger a stop out. Risk is fixed relative to the balance, so a larger deposit does not mean a higher percentage return. Please use only funds you can afford to risk.
