Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.
What Is This Strategy?
The Schaff Trend Cycle Momentum Breakout is a momentum-based trading strategy built around the Schaff Trend Cycle (STC), a cyclical oscillator that refines the well-known MACD (Moving Average Convergence Divergence) indicator. Where a raw MACD line can lag and wander, the STC applies a double stochastic normalisation to compress that momentum into a bounded 0–100 range. The result is an oscillator that cycles faster than raw MACD and tends to flag shifts in momentum earlier, which is why the STC is popular among traders who study trend timing.
This strategy is designed for trending or cyclical market conditions — environments where price swings between periods of over-extension and reversal rather than drifting sideways in a tight range. The core idea is to wait until the STC has pushed into an "oversold" or "overbought" zone and then turns back, treating that turn as the launch of a fresh momentum move rather than a random noise spike. Because the double smoothing filters out much of the jitter, the strategy attempts to identify sustainable breakouts instead of every minor wiggle.
As a learning tool, this Expert Advisor (EA) is well suited to traders who want to understand how oscillator normalisation, momentum breakouts, and volatility-based risk sizing fit together in a single automated system. It is not a shortcut to results — it is a transparent, rules-based framework you can study, backtest, and adapt. If you are learning how the MACD, stochastic normalisation, and Average True Range (ATR) interact, this strategy offers a clean, self-contained example.
How It Works
The strategy processes one completed price bar at a time and rebuilds the STC oscillator iteratively, bar by bar. Here is what happens under the hood and how signals are generated:
- Building the MACD line: On each newly closed bar, the strategy updates two exponential moving averages (EMAs) of the close — a fast EMA and a slow EMA. The difference between them (fast minus slow) is the MACD line, a measure of short-term momentum relative to the longer trend.
- First stochastic pass: The MACD line is normalised with a stochastic calculation over the
CycleLenlookback, expressing where the current MACD sits between its recent minimum and maximum on a 0–100 scale. This raw value is then smoothed with a short iterative EMA. - Second stochastic pass: That smoothed series is run through the same stochastic normalisation again and smoothed a second time. This double pass is what produces the final STC oscillator — a value between 0 and 100.
- Long entry signal: The strategy signals a long when the STC was previously below the oversold level (
OversoldLevel, default 25) and the current STC value turns up (current reading higher than the previous reading). This is read as an upward momentum breakout emerging from an oversold condition. - Short entry signal: The strategy signals a short when the STC was previously above the overbought level (
OverboughtLevel, default 75) and the current STC value turns down (current reading lower than the previous reading). This is read as a downward momentum breakout from an overbought condition. - One position at a time: If a position for this symbol and magic number is already open, no new order is placed. The STC continues updating in the background so the oscillator stays in sync.
- Stop-loss logic: Stops are sized by volatility using the ATR. The stop distance is
AtrStopMult × ATR— placed below entry for longs and above entry for shorts. Wider volatility produces wider stops, and quieter markets produce tighter ones. - Take-profit logic: The take-profit is a fixed multiple of the stop distance, set by
RRMultiple(default 2.0). A value of 2.0 means the target distance is twice the stop distance, giving a 1:2 risk-to-reward ratio on each trade.
Every trade therefore carries a pre-defined stop and target the moment it is opened, and the direction is chosen only when the oscillator confirms a turn out of an extreme zone.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| EmaFast | 23 | 5 | 50 | Fast EMA period used to build the MACD line. |
| EmaSlow | 50 | 20 | 100 | Slow EMA period used to build the MACD line. |
| CycleLen | 10 | 5 | 30 | Stochastic lookback window for both %K normalisation passes. |
| SmoothPeriod | 3 | 2 | 10 | Smoothing period (iterative EMA) applied to each %K pass. |
| OversoldLevel | 25.0 | 5.0 | 45.0 | STC level below which a rising turn triggers a long signal. |
| OverboughtLevel | 75.0 | 55.0 | 95.0 | STC level above which a falling turn triggers a short signal. |
| AtrPeriod | 14 | 5 | 30 | ATR lookback used to size the stop distance. |
| AtrStopMult | 1.5 | 0.5 | 4.0 | Stop distance expressed as a multiple of ATR. |
| RRMultiple | 2.0 | 1.0 | 5.0 | Take-profit distance as a multiple of the stop distance (risk-to-reward ratio). |
| Lots | 0.10 | 0.01 | 1.0 | Fixed order volume in lots. |
| Magic | 9260 | 0 | 9,999,999 | Unique identifier so the EA manages only its own trades. |

Recommended Chart Settings
This strategy was designed to be tested on major forex pairs (such as EUR/USD) on intraday timeframes like the H1 (1-hour) chart, where the STC's cyclical behaviour tends to be well defined. The default parameters — a 23/50 EMA MACD with a 10-bar cycle — assume a timeframe that produces regular, moderately sized swings.
That said, no single symbol or timeframe is universally "correct." The STC will behave differently on volatile pairs, exotic crosses, indices, or higher timeframes such as H4 and D1. Results will vary across different market conditions, spreads, and broker feeds, so treat the defaults as a starting point for your own testing rather than a fixed recommendation. Always run the Strategy Tester across several market regimes before drawing any conclusions.
How to Install on MetaTrader 5
- Download the .ex5 file from the link below
- Copy it to your MT5
MQL5\Expertsfolder - Restart MetaTrader 5 or refresh the Navigator panel
- Drag the EA onto a chart matching the recommended symbol and timeframe
- Configure the input parameters and enable Algo Trading
What to Consider Before Using This EA
Like every strategy, the Schaff Trend Cycle Momentum Breakout has both strengths and clear limitations, and understanding them is part of using it responsibly.
Strengths. The STC's double stochastic smoothing is deliberately designed to reduce the whipsaw that plagues a raw MACD, so signals tend to be cleaner and can appear earlier in a developing move. Requiring the oscillator to turn out of an extreme — rather than simply crossing a level — adds a small confirmation filter. Volatility-based stops from the ATR also mean the strategy adapts its risk distance to current conditions instead of using a fixed pip stop that ignores market context.
Limitations. Oscillators like the STC are most comfortable in cyclical or trending markets and can generate frequent, unproductive signals in choppy, directionless ranges, where price crosses the extreme zones repeatedly without following through. Because entries are momentum breakouts, the strategy may also enter after part of a move has already occurred, and a fixed risk-to-reward target does not adapt to changing volatility once a trade is open. During strong, sustained trends the oscillator can remain "overbought" or "oversold" for long stretches, producing counter-trend signals that get stopped out.
In short, this is a focused momentum tool, not an all-weather system. It is best studied as one component of a broader trading education, tested thoroughly on historical data, and combined with your own understanding of market context.
Risk Management Tips
- Position sizing: Keep your lot size aligned with your account balance. The default of 0.10 lots may be far too large or too small for your situation — size it to your capital, not to the default.
- Risk per trade: A widely taught guideline is to risk no more than 1–2% of your account on any single trade. Use the ATR-based stop distance to calculate the lot size that keeps you within that limit.
- Use a demo account first: Test the EA on a demo or paper-trading account until you understand its behaviour across different conditions before considering any live capital.
- Understand drawdown: Every strategy experiences losing streaks. Study the maximum drawdown in your backtests so you know what a normal rough patch looks like and can avoid abandoning a plan at the worst moment.
- Account for costs: Spreads, commissions, slippage, and swap fees all affect real outcomes and are easy to overlook in an idealised backtest.
- Never over-leverage: Leverage amplifies losses as much as gains. Keep your exposure modest, especially while you are still learning how the strategy responds to live markets.
Risk Warning
Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.
Downloads
- Expert Advisor: SchaffTrendCycleMomentumBreakout.ex5 (46 downloads)
- Source Code: SchaffTrendCycleMomentumBreakout.mq5 (47 downloads)
- Documentation: SchaffTrendCycleMomentumBreakout.pdf (49 downloads)