- Strategy
- Buys when a bar closes above the upper Keltner Channel with momentum above 100 and a bullish candle, and sells on the mirror conditions below the lower channel.
- Risk model
- 1% of balance per trade (configurable), ATR-based stop-loss on every order, one position at a time
What it does
Keltner Breakout EA trades price escaping its normal volatility envelope. The Keltner Channel is built from an EMA and ATR, so it widens and narrows with the market. A close outside it shows an unusually strong bar; the EA asks momentum to agree before it joins the move.
How it works
The channel lines are EMA(20) ± 2 × ATR(10), calculated by the EA from the built-in EMA and ATR. On each new bar:
- Buy: the last closed bar closed above the upper line, the bar before it closed at or below its upper line, Momentum(10) is above 100.1, and the breakout candle closed above its open.
- Sell: the last closed bar closed below the lower line, the bar before closed at or above it, Momentum(10) is below 99.9, and the candle closed below its open.
- Stop-loss: 1.5 × ATR(14) from entry. Take-profit: 2 × the stop distance.
- Midline exit (optional): a buy is closed when a bar closes below the EMA, a sell when a bar closes above it.
The MT5 Momentum indicator equals the current close divided by the close 10 bars earlier, times 100, so values above 100 mean price is higher than it was 10 bars ago.
How to use it
This is a trend-continuation tool, so it fits markets that move in persistent swings: gold, indices and the more directional currency pairs. H1 and H4 give fewer, cleaner signals than lower timeframes. You can tighten the momentum threshold for stricter confirmation or turn off the candle-direction rule for more trades. Read about moving averages for the EMA basics.
Settings
| Input | Default | What it changes |
|---|---|---|
| Keltner midline EMA period | 20 | Channel center |
| Keltner ATR period / width | 10 / 2.0 | Channel width |
| Momentum period / threshold | 10 / 100.1 | Confirmation strength |
| Breakout candle direction | true | Requires a bullish or bearish candle body |
| ATR period / Stop-loss (x ATR) | 14 / 1.5 | Stop size |
| Reward:risk target | 2.0 | Take-profit, 0 disables it |
| Midline exit | true | Early exit when the move fails |
| Risk per trade / Fixed lots | 1.0% / 0 | Position sizing |
| Max spread / Trading hours | 30 / 7–20 | Filters |
| Break-even / Trailing | on / off | Stop management |
Limitations
Breakout systems often produce strings of small losses in ranges, with gains concentrated in fewer trending periods. Entries come after a large bar has already closed, so the entry price is sometimes stretched. The midline exit can close a trade during a normal pullback that later resumes.
Before you run it live
Test across several symbols and years in the Strategy Tester, compare results with and without the midline exit, and then run it on demo. Check that the spread filter fits your instrument. Keep risk per trade low, since losing streaks are normal for breakout logic. Past behavior does not guarantee future results.

