TrendCandleEA — Config 1.4 (Intermediate): The Balanced Middle-Ground XAUUSD Configuration
A fourth official TrendCandleEA configuration for XAUUSD — a deliberately intermediate profile that sits between Config 1.1 (Balanced) and Config 1.2 (Selective), with a Virgin Price lookback of 2 500 candles.
Table of Contents
- Introduction
- The Configuration
- Results in Depth
- The Four XAUUSD Configurations Compared
- Which Trader Is This Configuration For?
- How to Use It
- Conclusion
- Useful Links
1. Introduction
Three XAUUSD configurations of TrendCandleEA are already documented:
- Config 1.1 — Balanced (Virgin Price lookback = 1 000 candles)
- Config 1.2 — Selective (Virgin Price lookback = 10 000 candles)
- Config 1.3 — Active (Virgin Price filter entirely disabled)
Config 1.1 and 1.2 are structurally almost identical: they differ only in the depth of the Virgin Price lookback. One trades more often with a slightly higher drawdown, the other trades less often with a higher win rate and a smoother equity curve. Config 1.3 is a different animal — it drops the Virgin Price filter altogether and relies on momentum instead.
This article introduces a fourth, intermediate configuration — Config 1.4 — Intermediate. It is built on the same engine as Config 1.1 and 1.2, but the Virgin Price lookback is set to 2 500 candles, exactly between the two extremes.
The goal is straightforward: offer a middle-ground profile for traders who find Config 1.1 too permissive and Config 1.2 too restrictive, without switching to a completely different filter philosophy.
2. The Configuration
| Parameter | Value |
|---|---|
| Symbol | XAUUSD |
| Timeframe | M30 |
| InpMagic | 1001 |
| InpTradeComment | TrendCandle (recommended: a distinct label for identification — see Section 6) |
| InpSlippagePoints | 30 |
| InpMaxSpreadPoints | 65 |
| InpMaxPositions | 0 (unlimited) |
| Matrend (EMA 50) | OFF |
| HTF MA (H4 EMA 200) | OFF |
| ADX (7, ≥ 25) | ON |
| RSI filter | ON — period 7, thresholds 65/35 |
| MACD momentum | ON (12, 26, 9) |
| Candle quality filter | OFF |
| Bollinger Modality A (median, H3) | ON — require middle slope |
| Bollinger Modality B (outer band, H1) | ON |
| SMC filter | OFF |
| ZigZag #1 (M30, Depth 24) | ON |
| Volume filter | OFF |
| Virgin Price filter | ON — 2 500 candles |
| SL buffer | 1 000 points |
| Exit mode | Fixed TP = SL distance (1:1) |
| Lot mode | Fixed lot 0,01 |
— InpVirginCloseBars = 2500 — the Virgin Price lookback is set exactly halfway between Config 1.1 (1 000) and Config 1.2 (10 000).
— InpRsiPeriod = 7 — a faster RSI than the 14-period used in Config 1.1 and 1.2. This provides a slightly earlier reaction to momentum changes, which pairs well with the intermediate Virgin Price window.
2.1 What Is the Virgin Price Filter Again?
The Virgin Price filter rejects a trade if the close of the signal candle has already been "visited" by any of the N previous candles — that is, if any of those candles' highs or lows (depending on the configuration) covered that price. The idea is that a level which has never been touched before tends to act as a magnet: the market has to travel through it to discover order flow.
The length of the lookback window (N) is the single most influential parameter of the filter:
- N = 1 000 candles (~21 days of M30) → many prices are still "virgin", so the filter rejects relatively few trades. Higher frequency.
- N = 10 000 candles (~7 months of M30) → almost all prices have been visited, so the filter rejects nearly everything. Lower frequency, higher conviction.
- N = 2 500 candles (~52 days of M30) → a compromise. Roughly two months of price history is consulted. The result is a filter that removes some noise but still lets a reasonable number of signals through.
3. Results in Depth
| 63 Trades | 73,02 % Win Rate | 2,23 Profit Factor | 6,48 % DD Balance Max | 17,91 Sharpe Ratio | 5,75 Recovery Factor |
3.1 Global Statistics
| Metric | Value |
|---|---|
| Total Net Profit | 810,28 USD (+81,03 %) |
| Gross Profit | 1 467,45 USD |
| Gross Loss | −657,17 USD |
| Profit Factor | 2,23 |
| Expected Payoff | 12,86 USD / trade |
| Sharpe Ratio | 17,91 |
| Recovery Factor | 5,75 |
| Balance Drawdown Maximal | 118,01 USD (6,48 %) |
| Equity Drawdown Maximal | 140,86 USD (7,71 %) |
| Total Trades | 63 |
| Profit Trades | 46 (73,02 %) |
| Loss Trades | 17 (26,98 %) |
| Average Profit Trade | 31,90 USD |
| Average Loss Trade | −38,66 USD |
| Largest Profit Trade | 82,96 USD |
| Largest Loss Trade | −96,46 USD |
| Max Consecutive Wins | 12 (333,26 USD) |
| Max Consecutive Losses | 3 (−101,31 USD) |
| Average Holding Time | 3 h 20 min |
3.2 Directional Breakdown
Config 1.4 traded 47 long trades (78,72 % win rate) and 16 short trades (56,25 % win rate). This is a moderately long-biased profile, which is not unusual for a 9-month period on gold that spent most of its time in an uptrend. The short trades are fewer but still meaningfully present, which distinguishes Config 1.4 from the pure long-only behaviour of Config 1.2.
3.3 Key Observations
- Moderate trade frequency: 63 trades over 9 months is about 7 per month, or roughly 1,5 per week. This sits between Config 1.2 (4/month) and Config 1.1 (11/month).
- Win rate close to Config 1.1: 73,02 % is very close to Config 1.1's 72,45 % and materially below Config 1.2's 83,78 %. The intermediate Virgin Price window does not, by itself, produce the higher win rate of the deepest setting.
- Drawdown comparable to Config 1.1: 6,48 % maximum balance drawdown and 7,71 % maximum equity drawdown. This is notably higher than Config 1.2's 4,25 % / 5,06 %, and roughly in line with Config 1.1's 6,55 % / 7,30 %.
- Net return close to Config 1.2: +81,03 % over 9 months, essentially the same absolute return as Config 1.2 (+79,7 %) but with nearly twice as many trades.
- Long/short balance preserved: unlike Config 1.2 (which traded 37 longs and 0 shorts during the test window), Config 1.4 kept a real short exposure (16 trades).
4. The Four XAUUSD Configurations Compared
| Metric | 1.1 — Balanced | 1.2 — Selective | 1.4 — Intermediate |
|---|---|---|---|
| Virgin Price bars | 1 000 | 10 000 | 2 500 |
| Trades | 98 | 37 | 63 |
| Win rate | 72,45 % | 83,78 % | 73,02 % |
| Profit Factor | 2,65 | 5,60 | 2,23 |
| Balance DD Max | 6,55 % | 4,25 % | 6,48 % |
| Equity DD Max | 7,30 % | 5,06 % | 7,71 % |
| Net profit | +151,3 % | +79,7 % | +81,03 % |
| Sharpe Ratio | 19,74 | 31,21 | 17,91 |
| Recovery Factor | 9,16 | 9,16 | 5,75 |
| Long / Short | 62 / 36 | 37 / 0 | 47 / 16 |
Reading the table:
- Config 1.4 has the middle frequency. 63 trades sits neatly between 37 and 98, confirming the intermediate nature of the Virgin Price setting.
- Config 1.4's risk profile is closer to Config 1.1. The drawdown levels (6,48 % balance, 7,71 % equity) are very close to Config 1.1's, not Config 1.2's.
- Config 1.4's net return is closer to Config 1.2. +81,03 % is nearly identical to Config 1.2's +79,7 %, but achieved with 70 % more trades.
- Config 1.4's Profit Factor and Recovery Factor are lower than both. This reflects the fact that intermediate settings are not automatically better — they simply represent a different trade-off.
5. Which Trader Is This Configuration For?
The XAUUSD family of TrendCandleEA configurations now covers four distinct trader profiles. None is objectively better — each expresses a different set of priorities.
5.1 Config 1.1 — Balanced
Profile: The pragmatic trend-follower.
Wants a reasonable number of opportunities (roughly 10–11 per month), accepts a moderate drawdown (6–7 %), and is comfortable with a mid-range Profit Factor. Not scared by normal loss streaks. Wants a configuration that "works" without demanding exceptional patience or exceptional risk tolerance.
5.2 Config 1.2 — Selective
Profile: The capital-preservation trader.
Prioritizes low drawdown, high win rate and a smooth equity curve. Comfortable with few trades (roughly 4 per month) and long waiting periods. Accepts a lower absolute return for very high conviction per trade. Best for traders who find drawdowns psychologically difficult, or who run the EA on an account where capital preservation is a hard requirement.
5.3 Config 1.3 — Active
Profile: The momentum trader.
Wants frequency and symmetrical long/short exposure. Comfortable with a higher drawdown (10 % range), a lower win rate per trade, and a Virgin-Price-independent logic driven by momentum, dual ZigZag and volume. Best for traders who want the EA to participate actively and do not mind a higher variance.
5.4 Config 1.4 — Intermediate
Profile: The compromise trader.
Config 1.4 is designed for traders who:
- Find Config 1.1 too aggressive in trade count (98 trades) but are not ready to accept the very low frequency of Config 1.2 (37 trades).
- Want a middle-ground Virgin Price window — a filter that is meaningful but not restrictive.
- Are comfortable with drawdown levels similar to Config 1.1 (6–7 %) and want a real short-side exposure (unlike Config 1.2 which traded long-only during the test window).
- Prefer a slightly faster RSI (period 7) that reacts more quickly to momentum shifts.
- Do not require the highest Profit Factor or Recovery Factor of the family, but want a well-rounded configuration with visible activity on the account.
In short: Config 1.4 is for the trader who wants the middle of the road — more active than Config 1.2, more conservative than Config 1.1, and structurally different from Config 1.3.
6. How to Use It
6.1 Installation
- Open MetaTrader 5 and locate the EA in the Navigator.
- Drag the EA onto an XAUUSD M30 chart.
- In the input window, apply the parameters listed in Section 2.
- Ensure InpMagic = 1001 so that it does not interfere with other configurations running on the same account.
6.2 Recommended Customization — Trade Comment
If you run several configurations on the same account, use a distinct trade comment for each, so that open positions can be identified at a glance from the MT5 mobile app. For example:
- Config 1.1 → XauTrend-Balanced
- Config 1.2 → XauTrend-Selective
- Config 1.3 → XauTrend-Active
- Config 1.4 → XauTrend-Intermediate
6.3 Operational Notes
- The EA evaluates signals once per closed M30 candle.
- Trailing state is persisted in global variables, so the EA recovers cleanly after a terminal restart, disconnection or power outage.
- ZigZag and Volumes Indicator chart objects are automatically created and removed by the EA. Nothing is left behind when the EA is removed from the chart.
- The RSI period of 7 is shorter than usual. It reacts faster but produces more frequent threshold crossings. If you find the resulting trade frequency too high in live conditions, you can revert to RSI 14 without breaking the configuration — the rest of the filter stack remains unchanged.
7. Conclusion
Config 1.4 — Intermediate completes the XAUUSD family of TrendCandleEA configurations with a deliberately middle-ground profile. By setting the Virgin Price lookback to 2 500 candles — exactly halfway between Config 1.1's 1 000 and Config 1.2's 10 000 — and by shortening the RSI period to 7, the configuration delivers a trade frequency that sits between the two extremes while keeping the risk profile close to Config 1.1.
Over 9 months of 100 % real-tick backtest on Tickmill-Demo, Config 1.4 produced:
- 63 trades, a 73,02 % win rate (46 wins / 17 losses),
- Profit Factor of 2,23,
- +81,03 % net return with 6,48 % maximum balance drawdown and 7,71 % maximum equity drawdown,
- Sharpe Ratio of 17,91,
- Real long/short exposure: 47 long trades (78,72 % win rate) and 16 short trades (56,25 % win rate).
Config 1.4 does not aim to be the best in any single metric. It aims to be a well-rounded configuration for traders who want the middle of the road — between the frequency of Config 1.1 and the selectivity of Config 1.2, without adopting the momentum-driven philosophy of Config 1.3.
Thank you for reading. Feedback, bug reports and suggestions are welcome in the comments section.


