Blog / Strategy
Strategy

Instantaneous Trendline Cross

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 Instantaneous Trendline Cross is a trend-following, with-trend re-entry strategy built around John Ehlers' Instantaneous Trendline (often abbreviated iTrend) — a near-zero-lag recursive smoother of price introduced in his book Cybernetic Analysis for Stocks and Futures. Unlike a traditional moving average, which lags noticeably behind price, the iTrend is engineered to hug the smoothed path of the market with far less delay, while still filtering out the tick-by-tick noise that causes false signals.

Paired with the iTrend is its companion Trigger line — a two-bar linear projection of the trendline (trigger = 2×iTrend − iTrend[2]). Because this projection leads the trendline slightly, the moment the Trigger crosses the iTrend marks the exact bar on which the smoothed path changes direction. Ehlers' original signal is simple: when the Trigger crosses above the iTrend, momentum has turned up; when it crosses below, momentum has turned down.

This strategy takes that crossover idea and adds a discipline layer. Instead of trading every crossover — which tends to whipsaw badly in sideways markets — it only acts on a cross when the trendline is already sloping in a meaningful direction. That makes it a learning tool for traders interested in cycle-based smoothing, low-lag signal timing, and regime filtering. It is best suited to those who already understand basic indicator mechanics and want to study how a well-known digital signal-processing indicator can be combined with a volatility-based trend gate. It is not a "set and forget" system, and it should be treated as a study framework rather than a shortcut.

How It Works

The strategy processes one completed bar at a time and evaluates a fresh signal only once per bar. Each new bar's median price (the average of the high and low) is fed into the recursive iTrend formula, and the leading Trigger line is derived from it.

Entry conditions — the strategy signals a trade when:

Stop-loss logic:

Take-profit logic:

In plain terms: the trendline defines the regime, the slope gate confirms the trend is real, and the low-lag crossover times the entry — with fixed ATR-based risk on every trade.

instantaneous trendline cross MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
Alpha 0.07 0.03 0.15 iTrend smoothing constant, a proxy for the dominant market cycle. Smaller values produce a smoother, slower trendline; larger values react faster.
SlopeBars 5 2 15 Lookback in bars over which the trendline slope is measured for the regime gate.
MinSlopeAtrFrac 0.10 0.0 0.60 Minimum trendline slope, expressed as a fraction of ATR, required before a crossover is traded. Higher values demand a stronger trend.
AtrPeriod 14 5 30 Number of bars used to calculate ATR for both the slope gate and the stop distance.
AtrStopMult 2.0 1.0 5.0 Stop-loss distance as a multiple of ATR from the entry price.
RewardRiskRatio 1.5 1.0 4.0 Take-profit distance as a reward-to-risk multiple of the stop distance.
Lots 0.10 0.01 1.0 Fixed trade volume (position size) in lots.
instantaneous trendline cross MT5 EA — MQL5 source code

Recommended Chart Settings

The Instantaneous Trendline Cross is a single-timeframe strategy: every calculation uses whatever timeframe the chart or backtest is set to, so there is no hidden higher-timeframe dependency. Because the iTrend was originally designed for smoothing swing-scale cycles, many traders study it on the H1 (1-hour) or H4 (4-hour) timeframes, where the balance between signal frequency and noise tends to be more workable than on very fast charts.

For the symbol, major forex pairs such as EUR/USD — which typically offer tight spreads and deep liquidity — are a common starting point for evaluating cycle-based smoothers. That said, the iTrend's behavior depends heavily on the dominant cycle of the instrument you apply it to, and the Alpha value that suits one market may not suit another. Results will vary considerably across different symbols, timeframes, and market conditions, so treat any single configuration as a starting point for your own testing rather than a finished setting.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths of the approach. The iTrend's key advantage is low lag — it aims to signal turns closer to the actual price pivot than a comparable moving average, which is valuable for timing re-entries. The slope-based regime gate is a thoughtful addition: it directly targets the biggest weakness of raw crossover systems by refusing to trade when the trendline is flat. Combined with ATR-scaled stops and a defined reward-to-risk target, the strategy embodies a disciplined, rules-based structure that is genuinely useful to study.

Known limitations. Ehlers' recursive smoothers assume a reasonably persistent dominant cycle. When the market's character shifts abruptly, the iTrend can be caught out, and the fixed Alpha does not adapt on its own. Crossover signals — even filtered ones — can still cluster around choppy, low-momentum transitions, producing a series of small losses before a trend resumes. The take-profit is a fixed multiple of the stop rather than a trailing exit, so strong trends may be capped early, while the ATR stop can be reached quickly during volatility spikes.

Where it may underperform. Range-bound, low-volatility markets are the natural enemy of any crossover-and-slope system: the slope gate will block many trades (helpful), but the ones that slip through are the most likely to whipsaw. News-driven gaps and sudden volatility expansions can also push price through the ATR stop before the trendline has time to react. As always, no indicator anticipates fundamental shocks. Approach this EA as an educational framework for understanding cycle smoothing and regime filtering — not as a dependable source of returns.

Risk Management Tips

Sound risk management matters more than any single indicator. Consider the following general principles as you study this strategy:

Risk management is what keeps you in the game long enough to learn — it is the foundation, not an afterthought.

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

← Back to Blog