Windlass Gold Ensemble
- Experts
- Versione: 1.0
- Attivazioni: 5
Windlass Gold Ensemble is an original Expert Advisor for gold (XAUUSD) that runs three independent trading engines under one shared portfolio risk manager. Each engine has its own magic number and its own on/off switch, works only on closed bars, and sends a stop-loss with every order. Each engine holds at most one position at a time.
It does not use grids, martingale, averaging, partial closes, DLLs or web requests, and it has no hidden behaviour.
The three engines
- E1 Session breakout (H1). This engine marks the Asian range from 00:00 to 08:00 server time.
- It opens a trade when an H1 bar closes beyond that range between 08:00 and 16:00 server time.
- It skips the day if the range is narrower than 1 or wider than 6 H1 ATR.
- It takes at most one trade per day, with a 1.5 ATR stop and a 2R target, and closes the trade at 23:00 server time.
- E2 Trend pullback (H4 trend, H1 entry). The H4 EMA50 must be above (or below) the EMA200 and sloping the same way.
- Within the last 12 H1 bars, price must have pulled back to the H1 EMA20 minus (or plus) 0.5 ATR.
- The trade opens when a bar closes back through the EMA20 and beyond the previous bar's high (or low).
- It uses a 2.0 ATR stop and a 3.0 ATR trailing stop updated on closed bars, and closes after 48 bars.
- E3 D1 Donchian regime trend. This engine opens a trade when a D1 bar closes beyond the prior 20-day channel and the 20-day efficiency ratio is at least 0.35.
- It uses a 1.5 D1-ATR stop and a 2.5 ATR trailing stop.
- It exits when a D1 bar closes through the 10-day channel.
- This engine trades rarely, about 5 times a year in testing.
The engine timeframes are fixed (H1, H4 and D1), so the chart timeframe does not matter.
Shared portfolio risk manager
- Risk per trade: 0.75% of equity at the stop.
- Open-risk cap: the combined stop risk of all open engine positions is capped at 2% of equity. A new trade is sized down to fit the cap, or skipped if it cannot fit.
- Minimum-lot cap: if the broker's minimum lot is larger than the calculated size, the minimum lot is used only when its stop risks at most 5% of equity. Otherwise the trade is skipped and logged.
- Daily loss limit: after a 3% equity loss from the start of the server day, no new entries are taken that day.
- Drawdown pause: if equity falls 20% below its peak, new entries are paused for 5 days.
- Friday cutoff: no new entries from 18:00 server time on Friday.
- Spread filter: the spread must be at most 0.15 ATR. An optional cap in points is also available.
- Order checks: margin caps and OrderCheck, plus checks on volume, trade mode, stops level and freeze level before every order, modify and close.
- Account types: works on hedging and netting accounts. On a netting account only one engine can hold a position at a time.
- On-chart panel: shows each engine's state and position, the open risk against the cap, and the guard status.
Tested results (honest)
Test conditions.
- Every tick based on real ticks, JustMarkets-Demo2 symbol XAUUSD.m, H1 chart, leverage 1:100, v1.00 default inputs.
- Period 16 November 2025 to 16 November 2026. The broker data ends on 13 November 2026.
- 81,113,443 ticks, history quality 100% real ticks.
- Compiled with 0 errors and 0 warnings. No test run logged a trade error or a stop-out.
USD 10,000, hedging account:
- Net profit +5,828.22, profit factor 1.50, recovery factor 4.10, Sharpe ratio 3.16.
- Maximum equity drawdown 1,422.39 (10.96%). Maximum balance drawdown 868.03 (5.86%).
- 287 trades, 44.60% winners. Average win +136.26, average loss -73.04, largest loss -259.11. Longest losing streak: 7 trades (-575.38).
Contribution of each engine (USD 10,000 full year, closed deals per engine from the EA's tester report):
- E1 Session breakout: +2,727.83, PF 1.41, 166 trades.
- E2 Trend pullback: +2,868.14, PF 1.62, 116 trades.
- E3 D1 trend: +232.25, PF 1.80, 5 trades. This sample is very small.
Tuning vs held-out months. Settings were chosen on 16 November 2025 to 16 July 2026 only, using 12 real-tick variants on USD 10,000. Tuning was kept modest: E1 was switched from a trailing stop to a 2R target, and the E3 efficiency threshold was raised from 0.25 to 0.35. That E3 change rests on only 4 to 6 trades, so it is noise-level. The full-year USD 10,000 run, split by deal close time:
- Tuning window: +4,364.20, PF 1.68, 177 trades.
- Held-out last four months: +1,464.02, PF 1.28, 110 trades.
The held-out months stayed profitable but were clearly weaker than the tuning window. The largest closed-trade drawdown of the year (868.03) happened in the held-out period. By engine, the held-out result was E1 +920.00, E2 +540.46 and E3 +3.56.
USD 5,000 (same period, real ticks):
- Net +3,279.90, PF 1.58, maximum equity drawdown 1,108.10 (14.84%), 266 trades.
- Tuning window +2,547.29 (PF 1.79). Held-out +732.61 (PF 1.30).
- Some trades used the minimum lot: 13 for E1, 22 for E2 and 5 for E3. Those trades risked more than 0.75%.
USD 1,000 (same period, real ticks):
- Net +2,310.82, PF 1.55, but maximum equity drawdown 707.19 (26.70%), 254 trades.
- Almost every trade used the 0.01 minimum lot, so the risk per trade was far above 0.75%.
- The daily-loss guard stopped trading on 31 days, and the drawdown pause tripped once.
- Held-out months: only +194.20 (PF 1.13).
USD 1,000 is not recommended.
Netting account, USD 10,000 (real ticks):
- Net +2,573.97, PF 1.37, maximum equity drawdown 8.30%, 192 trades.
- Tuning window +1,729.07 (PF 1.43). Held-out +844.90 (PF 1.28).
- The result is lower than on hedging because a netting account allows only one engine position at a time, so many signals were skipped.
Small-deposit and other-symbol checks. These are netting runs with 1-minute OHLC over the same period, and they are technical checks only:
- XAUUSD D1 chart, USD 1,000: +2,043.79, PF 1.62, 194 trades, maximum equity drawdown 19.25%. The engines still use H1, H4 and D1.
- EURUSD H1, USD 1,000: -12.85, PF 0.98, 204 trades. The EA is not designed for EURUSD.
- XAUUSD D1 chart, USD 100: 0 trades. Every signal was skipped and logged because the 0.01 lot would have risked more than 5% of equity.
- EURUSD H1, USD 100: +16.12, PF 1.06, maximum equity drawdown 31.29%.
Recommendations
- Use it on XAUUSD, with any chart timeframe, on a low-spread gold account and a VPS.
- Minimum deposit: USD 5,000. In testing it was profitable with a 14.84% equity drawdown. Recommended: USD 10,000 or more, so the 0.75% sizing and the 2% open-risk cap work on almost every trade.
- A hedging account is recommended so all three engines can trade at the same time.
- Session hours are in server time. The tested broker uses about GMT+2/GMT+3. Adjust E1's hours if your broker's server time differs.
- E2 and E3 can hold positions over the weekend, so weekend gaps can make a loss larger than the stop.
Inputs (v1.00 defaults)
| E1_Enable / E1_RangeStartHour / E1_RangeEndHour | true / 0 / 8 |
| E1_TradeEndHour / E1_ExitHour | 16 / 23 |
| E1_MinRangeATR / E1_MaxRangeATR / E1_BufferATR | 1.0 / 6.0 / 0.0 |
| E1_StopATR / E1_TrailATR / E1_TakeProfitR | 1.5 / 0 (off) / 2.0 |
| E2_Enable / E2_TrendFast / E2_TrendSlow (H4) | true / 50 / 200 |
| E2_BandEMA / E2_BandATR / E2_Lookback (H1) | 20 / 0.5 / 12 |
| E2_StopATR / E2_TrailATR / E2_TakeProfitR / E2_HoldBars | 2.0 / 3.0 / 0 (none) / 48 |
| E3_Enable / E3_EntryBars / E3_ExitBars | true / 20 / 10 |
| E3_ErPeriod / E3_ErMin | 20 / 0.35 |
| E3_StopATR / E3_TrailATR | 1.5 / 2.5 |
| RiskPercent / MaxOpenRiskPercent / MaxMinLotRiskPct | 0.75 / 2.0 / 5.0 |
| DailyLossPercent / EquityDDPercent / PauseDays | 3.0 / 20.0 / 5 |
| FridayCutoffHour / MaxSpreadATR / MaxSpreadPoints | 18 / 0.15 / 0 (off) |
| MaxFreeMarginUsePercent / MinMarginLevel / SlippagePoints | 30 / 300 / 30 |
| EnableLong / EnableShort | true / true |
| MagicBase / ShowPanel | 26111950 (engines use 26111951, 26111952, 26111953) / true |
Disclaimer
These are historical simulations on one broker's data over one year, and they do not promise future results. Trading gold with leverage can lose money, including more than these backtests show. The held-out months were weaker than the tuning window (PF 1.28 vs 1.68), so do not treat the tuning-window figures as expected live performance.
