Bowsprit Gold Trend
- Experts
- Versão: 1.0
- Ativações: 5
Bowsprit Gold Trend is an original Expert Advisor for gold (XAUUSD). It trades the flips of a built-in adaptive trend line on closed H1 bars. Every order has a stop-loss. It holds one position at a time.
The trend-line maths is built into the EA, so you only need this one file. It is the same calculation as our separate Binnacle Trend Line indicator: in testing, the EA's flip times matched the indicator's on all 115 of 115 flips. You do not need the indicator to run the EA.
No grid, no martingale, no averaging, no DLL, no web requests, no hidden behaviour.
How it trades
- Trend line. An efficiency-weighted centre line with a volatility band. The band is 1.0× ATR in clean trends and up to 2.0× ATR in noisy markets. The line ratchets with the trend and flips only when a bar closes beyond it. The signal timeframe is set by an input (default H1), so the chart timeframe does not matter.
- Entry. On the first tick after a flip bar closes, the EA opens one market order in the new direction. An optional trend-strength filter is available; it is off by default.
- Stop. 3.0× ATR(14) of the signal timeframe, sent with the order.
- Target. 3× the stop distance, sent with the order. Set it to 0 to turn the target off.
- Exit on opposite flip. The position is closed when the line flips against it, and the new direction is opened.
- Optional trailing. TrailMode 1 trails the stop to the trend line. TrailMode 2 trails an ATR distance from the close. Both are off by default; in tuning, trailing did not improve results.
Risk controls
- Position size. 1% of equity at the stop. If the broker's minimum lot is larger than that, the minimum lot is used only when its stop risk is at most 5% of equity. Small accounts can tighten the stop down to 1.5× ATR to fit that cap. Otherwise the trade is skipped and logged.
- Daily loss limit. 3% from the start of the server day. No new entries for the rest of that day.
- Equity guard. If equity falls 20% below its peak, new entries are paused for 5 days.
- Spread filter. The spread must be at most 0.15× ATR. An optional cap in points is also available.
- Order checks. Margin, volume, trade mode, stops level and freeze level are checked before every order, modify and close. Works on hedging and netting accounts.
Tested results (honest)
Test conditions. Every tick based on real ticks, JustMarkets-Demo2 symbol XAUUSD.m, H1, leverage 1:100, v1.00 defaults. Period 16 November 2025 to 16 November 2026 (broker data ends 13 November 2026). Compiled with 0 errors and 0 warnings. No run produced trade errors or a stop-out.
USD 10,000:
- Net profit +1,448.60, profit factor 1.23, recovery factor 1.57.
- Equity drawdown maximal 923.89 (7.99%). Balance drawdown 797.90 (6.95%).
- 172 trades, 33.7% winners. Average win +135.96, average loss -56.47, largest loss -155.65.
- A netting-account run gave the same result.
Tuning vs held-out months. Settings were chosen lightly, on 16 November 2025 to 16 July 2026 only. I compared four variants: the defaults, trailing to the line, a 2-ATR stop with no target, and a strength filter of 30. The defaults had the highest net profit. Split of the full-year run by deal close time:
- Tuning window: +1,150.91, PF 1.28, 112 trades.
- Held-out last four months: +297.69, PF 1.13, 60 trades. This is clearly weaker than the tuning window, so expect weaker results than the full-year figure.
USD 5,000 (same period, real ticks): net +1,332.80, PF 1.30, equity drawdown 604.83 (9.25%), 170 trades. Tuning window +1,248.17 (PF 1.39), held-out four months +84.63 (PF 1.07). At this size 71 of the 170 entries used the 0.01 minimum lot, so those trades risked more than 1% (up to the 5% cap).
USD 1,000 (same period, real ticks): net -336.04, PF 0.60, equity drawdown 44.68%, 29 trades. At this size the 0.01 minimum lot usually risks more than 5% at a 3-ATR gold stop. 124 of the 174 flips were skipped, and the trades that were taken used minimum lots and some tightened stops. The EA is not suitable for USD 1,000 on gold.
Small-deposit netting checks (1-minute OHLC, same period; technical checks only):
- XAUUSD D1 chart, USD 1,000: -21.63, 44 trades, equity drawdown 34.8%.
- EURUSD H1, USD 1,000: -113.96, 188 trades. The EA is not designed for EURUSD.
- XAUUSD, USD 100: 0 trades. The minimum lot is always above the cap, so every trade was skipped and logged.
- EURUSD H1, USD 100: -52.01, 83 trades, drawdown 58%.
Recommendations
- XAUUSD, any chart timeframe. The signal timeframe defaults to H1.
- Minimum deposit: USD 5,000 (tested: profitable, 9.25% drawdown, but many minimum-lot trades). USD 10,000 or more lets the 1% risk sizing work on most trades. Use a low-spread gold account and a VPS.
- Expect long losing streaks. About two out of three trades lose, and profits come from fewer, larger trend moves.
Inputs (v1.00 defaults)
| SignalTF | H1 |
| LineAtrPeriod / LineErPeriod | 14 / 10 |
| LineFastPeriod / LineSlowPeriod | 2 / 30 |
| LineBandMin / LineBandMax | 1.0 / 2.0 (ATR) |
| CalcBars | 3000 (history bars used for the line) |
| MinStrength | 0 (off; 1-100 = minimum strength at the flip bar) |
| EnableLong / EnableShort | true / true |
| SessionStartHour / SessionEndHour | 0 / 0 (24h) |
| StopATR / TakeProfitR | 3.0 / 3.0 (0 = no target) |
| ExitOnOppositeFlip | true |
| TrailMode / TrailATR | 0 (off; 1 = trend line, 2 = ATR) / 3.0 |
| RiskPercent | 1.0 |
| MaxMinLotRiskPct / SmallAccountStopATR | 5.0 / 1.5 |
| DailyLossPercent | 3.0 |
| EquityDDPercent / PauseDays | 20.0 / 5 |
| MaxSpreadATR / MaxSpreadPoints | 0.15 / 0 (off) |
| MaxFreeMarginUsePercent / MinMarginLevel | 30 / 300 |
| SlippagePoints / MagicNumber / ShowPanel | 30 / 26111601 / true |
Disclaimer
These are historical simulations on one broker's data over one year. They do not promise future results. Trading gold with leverage can lose money, including more than the backtests show.
