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 Sinewave Trend Engagement strategy is a trend-following approach built around John Ehlers' Even Better Sinewave, a digital signal-processing indicator that turns raw price into a smooth, normalized wave. Rather than using the sinewave in its traditional role — calling cycle tops and bottoms in a ranging market — this strategy flips the idea on its head and uses it as a trend-engagement gauge. The core insight, documented by Ehlers himself, is that the normalized wave tends to "saturate" and pin near +1 or −1 while a genuine directional move is underway, but oscillates smoothly through zero when the market is merely cycling sideways.
The Even Better Sinewave is constructed entirely from closing prices in three stages: a high-pass filter strips out the slow trend component, a super smoother (a two-pole Butterworth filter) removes high-frequency noise, and an automatic gain control step divides the result by the root-mean-square of its own recent power so the output is forced into a roughly [−1, +1] range. That normalization is what makes the "saturation" behavior consistent across symbols and volatility regimes.
This strategy is designed for markets that alternate between range-bound chop and clean directional trends — which describes most major forex pairs. As a learning tool, it is well suited to traders who want to study how signal-processing filters can distinguish "trending" from "cycling" market states, and how an oscillator that saturates can be repurposed as a momentum-engagement trigger rather than a reversal signal. It is an analysis of a concept, not a shortcut to trading success.
How It Works
The strategy evaluates one completed candle at a time and never acts on a still-forming bar. On each newly closed bar it advances the Even Better Sinewave recursion and checks for a fresh "engagement" signal, always confirmed by a slower trend filter.
Entry conditions — the strategy signals a long when:
- The normalized sinewave crosses up through the positive
SignalThreshold(default +0.75). This is read as the wave saturating high — a sign that an up-trend has just engaged. - The closing price sits above the slow trend EMA (Exponential Moving Average, a moving average that weights recent prices more heavily). This direction filter keeps the strategy out of counter-trend saturation spikes.
The strategy signals a short (fully symmetric) when:
- The sinewave crosses down through the negative threshold (default −0.75), indicating a down-trend has engaged.
- The closing price sits below the trend EMA.
Exit conditions:
- Wave un-pinning (early exit): When an open position is running and the wave later collapses back through zero — falling below 0 for a long, or rising above 0 for a short — the trend is considered to have dis-engaged. The strategy closes the position early. This is the concept's own built-in exit and complements the protective ATR levels.
- Stop-loss: Set using the Average True Range (ATR), a volatility measure. For a long, the stop is placed
AtrStopMult × ATRbelow the entry price; for a short, the same distance above. This adapts the risk distance to current market volatility. - Take-profit: Placed
AtrTargetMult × ATRaway from entry in the trade's favor. With the default 2.0 stop and 3.0 target multipliers, the strategy aims for a reward-to-risk ratio of roughly 1.5-to-1 on trades that reach target.
Only one position per magic number is allowed at a time — the strategy never stacks or pyramids trades. It also enforces a warm-up period so the recursive filters have time to settle before any signal is trusted.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| HpPeriod | 40 | 20 | 80 | High-pass filter period. Larger values let only slower swings survive, producing fewer but bigger trend signals. |
| SmoothPeriod | 10 | 5 | 30 | Super-smoother period. Controls the noise-reduction versus responsiveness trade-off of the wave. |
| SignalThreshold | 0.75 | 0.30 | 0.95 | Saturation level the wave must cross to count as a trend engaging. Higher values demand stronger saturation. |
| TrendFilterPeriod | 100 | 20 | 300 | Period of the direction EMA. Price must be on the matching side of this average for a signal to be valid. |
| AtrPeriod | 14 | 5 | 50 | Lookback period for the ATR used to size the stop and target. |
| AtrStopMult | 2.0 | 0.5 | 6.0 | Multiplier applied to ATR to set the stop-loss distance from entry. |
| AtrTargetMult | 3.0 | 0.5 | 10.0 | Multiplier applied to ATR to set the take-profit distance from entry. |
| Lots | 0.10 | 0.01 | 1.0 | Trade volume in lots for each position. |

Recommended Chart Settings
The strategy runs on a single timeframe — whichever chart you attach it to — because every calculation references the chart's own timeframe. It was designed with major forex pairs (such as EUR/USD or GBP/USD) in mind, where the alternation between ranging and trending phases is pronounced and liquidity keeps the price series clean enough for the filters to work well.
A good starting point for study is the H1 (1-hour) or H4 (4-hour) timeframe, which tends to produce trends long enough for the saturation behavior to develop without being buried in intrabar noise. Lower timeframes generate more signals but also more false engagements; higher timeframes produce fewer, slower signals. Keep in mind that results will vary considerably across different symbols, timeframes, and market conditions — no single setting is optimal everywhere, and the defaults are a reasonable baseline for experimentation, not a finished configuration.
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
Strengths of this approach. The Even Better Sinewave is a genuinely elegant piece of signal processing. Its automatic gain control normalizes the output so the same SignalThreshold behaves consistently across different pairs and volatility environments — something raw oscillators struggle with. Because the strategy only fires when the wave saturates and the trend EMA agrees, it naturally filters out a lot of weak, choppy signals. The wave-un-pinning exit is also a thoughtful touch: it can pull the strategy out of a fading trend before price reaches the stop, which may reduce give-back on trades that stall.
Known limitations. Like all filter-based systems, the Even Better Sinewave introduces a warm-up delay and inevitably lags the very first tick of a new move — by design, since it is smoothing noise. In fast, news-driven spikes the wave may saturate late or whipsaw. The strategy is fundamentally trend-following, so in persistently range-bound or low-volatility conditions it can generate a series of small losing trades as engagements fail to follow through. The EMA direction filter helps, but no filter eliminates whipsaw entirely.
Where it may underperform. Tight, sideways ranges with frequent false breakouts are the hardest environment for this style of system. Very low-volatility instruments can also produce ATR stops so tight that normal noise stops the trade out. As always, historically a strategy that performed well on one symbol or period may behave quite differently on another — treat every parameter set as a hypothesis to be tested, not a proven setting.
Risk Management Tips
Sound risk management matters more than any single indicator. Consider these general principles as you study this strategy:
- Risk a small, fixed fraction per trade. Many educational sources suggest never risking more than 1–2% of account equity on any single position. Size your
Lotsso that the distance to your ATR stop represents that fraction, not more. - Test on a demo account first. Run the EA in a demo or on the MT5 Strategy Tester across multiple market conditions before committing any real capital. This lets you observe how it behaves in both trending and ranging phases.
- Understand drawdown. Every strategy experiences losing streaks. Know the largest peak-to-trough equity decline you are willing to tolerate, and stop to reassess if live behavior diverges sharply from your testing.
- Do not over-optimize. Tuning the parameters until a backtest looks perfect ("curve-fitting") usually produces settings that fail going forward. Prefer robust ranges over fragile optimum points.
- Diversify and stay realistic. No single EA should carry your entire account. Keep position sizes modest and expectations grounded — leverage magnifies losses as readily as gains.
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: SinewaveTrendEngagement.ex5 (30 downloads)
- Source Code: SinewaveTrendEngagement.mq5 (30 downloads)
- Documentation: SinewaveTrendEngagement.pdf (34 downloads)