Horizon Gold Trend EA
- Experts
-
Keijinro Mizutani
Hello, I’m kotoha, a system designer focused on research-driven, rule-based trading tools for the MT5 platform.
My work centers on market structure analysis, swing dynamics, and Fibonacci-based logic. - Versão: 1.9
- Ativações: 5
A standalone MT5 expert advisor for GOLD (XAUUSD) on M5. A regression-slope trend signal filtered by the higher-timeframe trend, long-only, with a 24-hour maximum hold and risk-% lot sizing. Verified on 100% real ticks over 2024-2026.
One trend signal, one higher-timeframe check — nothing else.
Horizon Gold Trend EA is a standalone expert advisor for MetaTrader 5, built exclusively for GOLD (XAUUSD) on the M5 chart. The signal, the filter, the exits and the lot sizing are all built into the EA itself: no separate indicator and no other product is required. It trades fully automatically and holds at most one position at a time.
How it trades
- The trend direction comes from the slope of a linear regression of price: the EA reads the market as "up" only while the regression line itself is rising.
- An entry is taken only when the trend on the higher timeframe (H1), judged with Ichimoku Kinko Hyo, agrees with that direction. If the two timeframes disagree, the EA stays out.
- Long only. The verified configuration does not sell: in the data used for verification, the short side of this setup did not hold up, so it was removed by design rather than left in.
- Signals are confirmed on closed bars only (no repainting), and entries are executed at market on the next bar.
- In the verified configuration the EA trades about 10 times per month on average — it is a selective setup, not a high-frequency one.
Exits
- Signal exit: the position is closed when the regression-slope signal turns down.
- Time cap: every position is closed after 24 hours at the latest, regardless of the signal.
- Optional emergency stop-loss (ATR-based distance) is available in the inputs, but it is OFF in the verified configuration: in verification, adding a stop-loss made the survival metrics of this setup worse, so the verified form relies on the signal exit and the time cap. Enabling it leaves the verified configuration.
Lot sizing
- Risk % mode (default): the lot is calculated with OrderCalcProfit so that a price move equal to the reference stop distance (an ATR-based distance) costs the set percentage of the account balance (default 1.0%). The same reference distance is used for sizing whether or not the emergency stop-loss itself is enabled.
- Before each order, the expected loss of the calculated lot is re-checked; if it exceeds the risk budget, the lot is reduced. An absolute maximum-lot cap also applies.
- Fixed-lot mode is available.
- Please note for small accounts: if even the minimum lot (typically 0.01) would exceed the set risk amount, the EA uses the minimum lot by default (this can be changed to skip the trade instead). On a small balance, the effective risk per trade can therefore be larger than the set percentage.
Verified results (MetaTrader 5 strategy tester)
The default inputs are the verified configuration. Tester: XMTrading MT5, XAUUSD, M5, 100% real ticks, default inputs.
| Test | Period | Initial deposit | Trades | Net profit | Profit factor | Balance drawdown (relative) |
|---|---|---|---|---|---|---|
| Full period, risk sizing on (default) | 2024-01-01 to 2026-10-31 | 10,000 USD | 334 | +14,682.58 USD | 1.53 | 14.41% |
| Full period, minimum lot 0.01 | 2024-01-01 to 2026-10-31 | 10,000 USD | 334 | +1,638.61 USD | 1.70 | 2.76% |
| 2026 only, minimum lot 0.01 | 2026-01-01 to 2026-10-31 | 100,000 JPY | 84 | +157,513 JPY | 1.96 | 17% |
The trade selection is the same in all three tests; only the position size differs. With risk sizing on, the lot varied trade by trade (0.03 to 0.47 in the full-period test), so profits, losses and drawdowns scale with the position size actually used.
The design was also checked for its intended use — a modest starting balance used over a few months. In a separate simulation study (bar data, swap costs included), the same configuration was started with 100,000 JPY at the beginning of every month from January 2024 to July 2026 and run for three months each time, 31 windows in total. The capital did not collapse in any of the 31 windows. This is a simulation result, not a guarantee.
Results were obtained in the strategy tester; live results will differ with broker feed, spread and execution.
Panel
An on-chart dashboard shows the verified-configuration status (with a warning when the chart is not XAUUSD M5), the current signal direction, the higher-timeframe filter status, ATR, the state of any open position including its floating profit or loss, the lot-sizing mode in use, and the account balance and equity. The dashboard can be dragged to any position on the chart, and it remembers where it was placed.
Inputs
All inputs default to the verified configuration. Changing them leaves the verified setup.
- Signal: regression period; ATR period (used for the emergency stop and the sizing reference distance)
- Higher-timeframe filter: on/off; Ichimoku periods for the H1 filter
- Maximum holding time: in bars of the chart timeframe (default corresponds to 24 hours on M5); 0 disables it (unverified)
- Emergency stop-loss: on/off (default off); stop distance as a multiple of ATR
- Lot sizing: risk sizing on/off; risk % (default 1.0); fixed lot (default 0.01); maximum lot cap (default 2.00); allow minimum lot above the risk amount (default on)
- Execution: magic number; allowed slippage; calculation bars; H1 calculation bars; maximum spread filter (default off)
Please note
- Designed and verified for XAUUSD on M5 only. Other symbols and timeframes are outside the verified track record.
- The verified configuration places no stop-loss by default. A fast adverse move can therefore produce a loss larger than any single loss seen in the test period; the 24-hour cap limits how long a position is held, not how much it can lose. Size your account accordingly, and test on a demo account first.
- Price feeds differ between brokers, so entries can shift slightly from the data used in verification.
- Past performance does not guarantee future results. This product is a trading tool and does not constitute investment advice. Trading foreign exchange and metals on margin carries a high level of risk, including the possible loss of principal, and may not be suitable for all investors.
