Overview
Horizon Scalper is a fully systematic 5‑minute scalper engineered for four highly liquid instruments: #USNDAQ100, XAUUSD (Gold), WTI Crude Oil and EURUSD. It enters only when six independent filters align, sizes every trade based on a fixed account‑currency risk, and pauses after a losing trade to avoid revenge‑style consecutive losses.
The bot is intentionally selective — typically 0.5 to 2 trades per day per symbol — and is built around a strict 1:1.5 reward‑to‑risk skeleton driven by ATR, so stops and targets adapt automatically to changing volatility regimes.
How it works (entry logic)
A LONG (and mirror SHORT) is opened on bar close only when all of the following are true on the previous closed bar:
- EMA crossover — Fast EMA crosses above the Slow EMA (momentum trigger).
- Trend filter — Close is above the longer‑period Trend EMA (trade with the higher‑timeframe direction).
- RSI range — RSI sits inside a "healthy momentum" band (not oversold, not overbought) — avoids both exhausted moves and stalling chop.
- ADX strength — ADX is above a minimum threshold, confirming a real trend rather than noise.
- Bollinger filter — Price is not pushed against the upper band (for longs) — prevents buying into immediate mean‑reversion.
- Candle confirmation — Current close is higher than the previous close.
Shorts use the symmetrical conditions (cross down, below trend EMA, RSI in short range, away from lower band, bearish close).
Risk and money management
- Fixed account‑currency risk per trade (default 50 CHF). The bot computes the unit volume so that an SL hit equals exactly your defined risk, regardless of instrument or current ATR.
- ATR‑based SL & TP — SL = ATR × 1.0, TP = ATR × 1.5 (default), so volatility expands and contracts your stops automatically.
- Minimum ATR floor — entries are skipped when the market is too quiet (low‑volatility chop).
- Cooldown circuit‑breaker — after a losing trade the bot stops trading for N bars (default 10), letting market conditions reset.
- Single‑position rule — never more than one open position per symbol.
- Trading session filter — trades only inside a defined UTC window (the high‑activity hours for the chosen asset).
Optimization instructions
Because Horizon Scalper trades on 5‑minute bars, market microstructure shifts quickly. The recommended workflow is:
Re‑optimization schedule
- Frequency: once per week.
- Lookback: the last 3 months of M5 data — going further back is counter‑productive because the M5 regime drifts.
- Backtesting mode: "m1 bars from Server (open prices)" is sufficient — you do not need tick‑data mode. The bot only acts on bar close, so m1‑open mode is faster and produces representative results.
- Spread: set a fixed value matching your broker's typical spread for the symbol (1 pip for FX/indices, 2–3 for Gold/WTI is realistic).
Parameters NOT to optimize
- Amount Risked on SL — this is your personal risk preference, not a strategy parameter. Set it to 1–2% of account equity and leave it.
- Trading Start / End hours — use the asset‑specific table above.
Walk‑forward validation (recommended)
After each weekly optimization, run a quick out‑of‑sample test on the most recent 1–2 weeks that were not part of the optimization window. Only deploy parameters that hold up out‑of‑sample.
Parameter reference
Risk
- Amount Risked on SL (default 50) — Account‑currency loss if SL is hit. The bot back‑calculates volume from this.
EMAs
- EMA Fast / Slow Period (9 / 21) — The crossover pair. Fast above Slow = bullish bias.
- EMA Trend Period (50) — Higher‑frame directional gate; entries only in its direction.
RSI
- RSI Period (7) — Short period for scalping responsiveness.
- RSI Long Min / Max (40 / 65) — Required RSI band for long entries.
- RSI Short Min / Max (35 / 60) — Required RSI band for short entries.
ATR / Risk
- ATR Period (14) — Lookback for volatility measurement.
- SL ATR Multiplier (1.0) — Stop distance = ATR × this.
- TP ATR Multiplier (1.5) — Target distance = ATR × this. Must be greater than SL multiplier or the bot will refuse to start.
- Min ATR Pips (3) — If current ATR is below this, entries are skipped.
ADX
- ADX Period (14) — Trend‑strength lookback.
- ADX Min Threshold (25) — Below this, market is treated as ranging and trades are skipped.
Bollinger Bands
- BB Period (20) — SMA basis.
- BB Std Dev (2.0) — Band width. Tighter = stricter exhaustion filter.
Risk Control
- Cooldown Bars After Lose Trade (10) — Number of M5 bars to wait after a loss before re‑arming.
Session Filter
- Trading Start (UTC) / Trading End (UTC) — Inclusive‑start, exclusive‑end UTC window. Use the asset‑specific table above; do not optimize.