The trend line break indicator draws the diagonal a chart reader would draw. Two recent pivot highs define a falling line. Two pivot lows define a rising one. Each line projects forward, and a close through it earns a mark.
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 | 2: Break Up, Break Down |
| Alerts | popup, push notification, email, sound |
| Inputs | 12 |
What the Trend line break Indicator draws on the chart
`Break Up` uses arrow 233 where price cuts a falling line.
`Break Down` uses arrow 234 where it cuts a rising one.
Trend objects show the two lines, in `ResistLineClr` and `SupportLineClr`.
Mark distance scales with range at `ArrowAtrMult` `0.6`.
- Break Up: arrow, lime, width 2, arrow code 233
- Break Down: arrow, red, width 2, arrow code 234

How the Trend line break Indicator calculates its values
Pivots come first
`PivotStrength` `3` confirms a swing with three bars either side. The code then takes only the two most recent pivot highs and the two most recent pivot lows.
Projection, not a fixed level
The code fits a straight line through each pair and evaluates it at the current bar. The line slopes, so the level it sits at changes with every bar that passes.
The break test reads two bars
A break needs the current close beyond the projected line while the previous close sat on the other side of it. `CooldownBars` `4` then blocks a second mark in the same direction for four bars.
How to read the signals
A diagonal level moves, so the same price can break it on one bar and not the next.
Lines redraw whenever a newer pivot replaces one of the pair.
Mark offset comes from range, so it suits any instrument.
The cooldown is why a strong break produces one mark rather than several.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
`EnableAlerts` is the umbrella and arrives true with `EnablePopup`. Switch `EnablePushNotify` to reach a phone, `EnableEmail` for mail, or `EnableSound` to play `SoundFile`. All three of those start off. A break reports on the closed bar.
Every Trend line break Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
PivotStrength |
Fractal pivot strength (bars each side). Bars either side confirming a pivot, default `3`. | 3 |
AtrPeriod |
ATR period for adaptive arrow offset. Bars in the range reading, default `14`. | 14 |
CooldownBars |
Minimum bars between same-direction breaks. Bars before a second same-direction mark, default `4`. | 4 |
Display settings
| Setting | What it does | Default |
|---|---|---|
ArrowAtrMult |
Arrow offset as ATR multiple. Mark offset as a share of range, default `0.6`. | 0.6 |
ResistLineClr |
Resistance trend line colour. Colour of the falling line, default `clrTomato`. | tomato |
SupportLineClr |
Support trend line colour. Colour of the rising line, default `clrDodgerBlue`. | dodger blue |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Umbrella across the routes, default `true`. | on |
EnablePopup |
Alert box in the terminal, default `true`. | on |
EnablePushNotify |
Alert to a phone, default `false`. | off |
EnableEmail |
Alert by mail, default `false`. | off |
EnableSound |
(see inputs panel) | off |
SoundFile |
(see inputs panel) | alert.wav |

Settings that fit your chart
Diagonal lines need clean swings to anchor to. EURUSD H1 is the reference chart, where a three-bar pivot gives a new line every few days. On M5 the lines redraw constantly. H4 holds one line for weeks at a time.
When the Trend line break Indicator fails
A three-bar pivot is shallow, so the line often anchors to minor swings.
Only the last two pivots count, so an older and better line never enters the picture.
The line moves every bar, which makes a break partly a function of timing.
Copy the compiled Trend line break 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.
Download the Trend line break Indicator for MT4 and MT5
The zip holds the compiled Trend line break 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
What does CooldownBars 4 prevent?
A cluster of marks from one break. After a signal the tool ignores the same direction for four bars, which matters because a projected line often gets cut several times in a row as it slopes away.
Why does ArrowAtrMult 0.6 scale better than points?
Because it sets the gap as six tenths of the current range reading rather than a fixed count. A quiet session gets a small offset and a fast one gets a large offset, with no per-instrument tuning.
How does PivotStrength 3 choose the line?
It confirms which swings count, and the code then takes the two most recent highs for the falling line and the two most recent lows for the rising one. Raising it gives steadier but later lines.
Does the Break Up level stay fixed?
No, and that is the key difference from a horizontal level. The line slopes, so the price needed to break it changes every bar. A break is therefore about when as much as about where.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Trend line break Indicator as one input. Always backtest before trading live.
Category: this is part of our Trend collection. 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 Foreign exchange autotrading on Wikipedia.
- For wider market background, see Dow Jones Select Indices at StockCharts ChartSchool.
