MetaTrader 5 · XAUUSD · Trend-following EAs

Stochastic Trend Pullback EA for MT5

Stoch Hook Pilot is a Stochastic EA for MT5 that only trades in the direction of the trend EMA: it buys when the Stochastic hooks up out of oversold in an uptrend and sells when it hooks down out of overbought in a downtrend, with an ATR stop-loss on every order.

Stoch Hook Pilot - stochastic ea mt5
Stoch Hook Pilot logo
$99One-time purchase · no subscription · free demo on MQL5
Buy on MQL5 Market →

Stoch Hook Pilot is a fully automated Expert Advisor for MetaTrader 5 - trend-following Stochastic hook entries. Buys oversold dips in an uptrend, sells overbought rallies in a downtrend. It is designed for XAUUSD (gold) and also runs on forex majors such as EURUSD and GBPUSD.

How it trades

  1. Trend filter - longs only when the last close is above a rising trend EMA (default 200), shorts only below a falling one.
  2. Hook - the Stochastic %K line crosses its %D signal line on a closed bar while it is in (or just leaving) the oversold zone for buys or the overbought zone for sells.
  3. Stop-loss at a fixed ATR distance (default 1.5 x ATR) and take-profit at an R-multiple (default 2R, 0 = none).
  4. Break-even - once the trade has moved 1R in profit the stop is lifted to entry (0 = off).

Risk management (built in)

  • Every trade is opened with a stop-loss. There is no martingale, no grid and no averaging down.
  • Position size from risk % of equity (default 1%) or a fixed lot; lots are normalised to the broker's min / max / step and reduced if free margin is not enough.
  • Daily loss limit: no new trades for the rest of the day once equity is down the set % from the day-start equity.
  • Max spread filter, optional trading-hours filter, and no orders while the market is closed or trading on the symbol is disabled.
  • Stop-loss / take-profit are always placed outside the broker's stops and freeze levels.
  • Works on hedging and netting accounts (on netting accounts it opens only when the symbol has no other position).
  • One position at a time per magic number; signals are evaluated once per closed bar (no repainting).

Inputs and default settings

InputDefault
Signal timeframeH1
Trend EMA period200
Stochastic %K period14
Stochastic %D period3
Stochastic slowing3
Oversold level (buy hooks)20.0
Overbought level (sell hooks)80.0
ATR period14
Stop-loss distance (x ATR)1.5
Take-profit (R multiple, 0 = none)2.0
Move stop to break-even at this R (0 = off)1.0
Risk per trade (% of equity), used when Fixed lot = 01.0
Fixed lot (0 = size from risk %)0.0
Maximum lot per trade (0 = broker maximum)10.0
Daily loss limit (% of day-start equity, 0 = off)3.0
Max spread (points, 2-digit gold scale: 100 = 1.00 USD; 0 = off)50
Max slippage (points, same scale)30
Trade only inside the hours belowfalse
Trading start hour (server time, 0-23)1
Trading end hour (server time, 0-23)22
Show status panel on the charttrue
Magic number (change it to run several instances on one symbol)26102201

Recommended setup

  • Symbol / timeframe: XAUUSD on the default timeframe shown above; also forex majors. Test other timeframes in the Strategy Tester first.
  • Account: hedging or netting, any deposit that allows the broker's minimum lot with a sensible risk %.
  • VPS: recommended for uninterrupted operation.

Honest notes

  • No trading system can guarantee profit. Past performance, in the tester or live, does not guarantee future results.
  • Always test the EA in the MetaTrader 5 Strategy Tester and then on a demo account before using real money, with your broker's own data and spread.
  • Hours are in your broker's server time.
  • Start with a low risk % and use money you can afford to lose.
How Stoch Hook Pilot trades - illustration
How it trades (illustration, not real trading results).
Stoch Hook Pilot risk management features
Built-in risk management.

Plan your risk before you run it

FAQ

Why does it ignore Stochastic signals against the trend?

Oversold readings in a downtrend often stay oversold. The EA only takes hooks that agree with a rising or falling trend EMA (default 200), which filters out most counter-trend signals.

Is there a free demo?

Yes. Every MQL5 Market product has a free demo that runs in the MetaTrader 5 Strategy Tester, so you can test it on your broker's own data before buying.

Does it use martingale, grid or averaging down?

No. Every position is opened with a stop-loss, the lot size comes from your risk % (or a fixed lot), and there is a daily loss limit.

Which broker and account do I need?

Any MetaTrader 5 broker that offers XAUUSD, on a hedging or netting account. A low-spread account and a VPS for 24/5 operation are recommended.

Can this EA guarantee profits?

No. No trading system wins every trade, and backtest or past results do not guarantee future results. Start on a demo account with the default risk.

Trading gold, forex and CFDs is high risk and you can lose your capital. This page is for information only and is not investment advice. Illustrations are not trading results.