The instant trendline filter indicator pairs an Ehlers filter with an unusual second line. Most builds average the filter to make a signal. This one projects it instead, using the value two bars back to extend the current one.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Main price chart |
| Plots | 4: ITrend, Trigger, BuySignal, SellSignal |
| Alerts | popup |
| Inputs | 3 |
What the Instant Trendline Filter Indicator draws on the chart
A dodger blue `ITrend` line carries the filter output.
An orange red `Trigger` line runs slightly ahead of it.
`BuySignal` uses arrow 233 and `SellSignal` uses 234.
Marks sit `InpArrowOffset` `18` points from the candle.
- ITrend: line, dodger blue, width 2
- Trigger: line, orange red, width 1
- BuySignal: arrow, lime, width 2, arrow code 233
- SellSignal: arrow, red, width 2, arrow code 234

How the Instant Trendline Filter Indicator calculates its values
The filter itself
`InpAlpha` `0.07` sets the coefficients that weight recent midpoints against the filter’s own last two outputs. Median price feeds it, meaning high plus low over two.
The trigger projects forward
Doubling the current value and subtracting the value from two bars back extends the line along its own slope. That is a projection rather than a smoothing, which is what makes it lead.
Crossings fill the marks
The two lines swapping places fills a buffer. Because the trigger leads, those crossings arrive earlier than an averaged signal would produce.
How to read the signals
The `Trigger` sits ahead of `ITrend`, which is the opposite of a lagging signal line.
Leading comes at the cost of more false crossings.
A lower `InpAlpha` smooths both lines and reduces the count.
Warm-up bars use a plain weighted mean until the recursion can run.
Alert channels in this build: popup, one message per closed bar.
A single route ships. `InpAlertsOn` arrives true and raises a terminal message when the two lines cross. There is no handset route, no mail route and no clip route among the inputs. Bars must close before it reports.
Every Instant Trendline Filter Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
InpAlpha |
Ehlers alpha smoothing constant. Filter coefficient, typically between 0.05 and 0.15, default `0.07`. | 0.07 |
Display settings
| Setting | What it does | Default |
|---|---|---|
InpArrowOffset |
Arrow offset (points). Points between a mark and the candle, default `18`. | 18 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
InpAlertsOn |
Alert on cross signal. Terminal message on a crossing, default `true`. | on |

Settings that fit your chart
A leading trigger suits charts with clean swings. EURUSD H1 is the reference chart, where crossings arrive every day or two. On M5 the projection whips around. H4 and daily produce a much cleaner pair of lines.
When the Instant Trendline Filter Indicator fails
A projection amplifies noise, since it extends whatever the slope just did.
Leading and wrong is worse than lagging and right, which is the trade here.
Only one alert route exists in this build.
Copy the compiled Instant Trendline Filter Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Background reading on the method behind the Instant Trendline Filter Indicator: CUSIP-linked MIP code on Wikipedia, Riskmanagement at Investopedia.
Download the Instant Trendline Filter Indicator for MT4 and MT5
The zip holds the compiled Instant Trendline Filter Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
How does the Trigger line lead ITrend?
It doubles the current filter value and subtracts the value from two bars back. That extends the line along its own slope, so it sits ahead of the filter rather than behind it.
What does InpAlpha 0.07 control?
How heavily the filter weights recent midpoints against its own past output. Lower values smooth both lines and cut the number of crossings. The source comment puts the useful band at 0.05 to 0.15.
Why does InpAlpha read median price?
The midpoint of high and low is steadier, since a close can land anywhere in the bar. Feeding the filter a calmer input means less of its work goes into removing avoidable noise.
Does a leading trigger mean earlier entries?
Earlier crossings, yes. Whether they are better is a different question, because a projection extends noise as readily as it extends a real move. Expect more marks and more of them failing.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Instant Trendline Filter Indicator as one input. Always backtest before trading live.
Category: this is part of our Trend collection. Also, truly, browse more Trend for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- Learn more about the underlying method in CUSIP-linked MIP code on Wikipedia.
- For wider market background, see Riskmanagement at Investopedia.
