The demark trendline trader indicator does three jobs in sequence. It finds pivots by DeMark’s rule, joins two of them into a line, then marks the close that breaks it and projects where the move might reach. Up to eight lines stay live at once.
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: TD Supply, TD Demand, BUY Break, SELL Break |
| Alerts | popup, push notification, email, sound |
| Inputs | 14 |
What the Demark Trendline Trader Indicator draws on the chart
Two lines, two marks and chart objects.
`TD Supply` runs tomato at width 1.
`TD Demand` runs lime beneath it.
`BUY Break` uses arrow 233 in lime at width 3.
`SELL Break` uses arrow 234 in red.
Text objects label each projected target.
- TD Supply: line, tomato, width 1
- TD Demand: line, lime, width 1
- BUY Break: arrow, lime, width 3, arrow code 233
- SELL Break: arrow, red, width 3, arrow code 234

How the Demark Trendline Trader Indicator calculates its values
DeMark pivots
The rule is strict. `TdLevel` `1` asks for one bar either side to stay lower than a high. Raising it to two demands a wider, rarer pivot.
Joining two
Order matters here. The line runs from an older pivot to a newer one, and `MaxPivotDistance` `80` caps how far apart they may sit. Beyond that the pair is dropped.
Break and target
A close through the line marks it. `TargetMultiplier` `1.0` then projects the line’s own height ahead, drawn forward for `TargetMaxBars` `60` bars.
How to read the signals
Each line needs two qualifying pivots behind it.
The slope tells you which way the structure leans.
A mark means a close cleared the line.
The projected target is arithmetic, not a forecast.
`MaxActiveLines` `8` keeps the chart from filling up.
Mark distance scales with the range reading.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
`EnableAlerts` covers the break alerts and starts true with `EnablePopup`. Use `EnablePushNotify` for a phone, `EnableEmail` for mail, or `EnableSound` to play `SoundFile`. Those three arrive off and breaks report once a bar.
Every Demark Trendline Trader Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
TdLevel |
TD pivot level (1=standard, 2=stricter). Bars either side of a pivot, `1`. | 1 |
LookbackBars |
Bars scanned for TD pivots. History scanned for pivots, `250`. | 250 |
MaxPivotDistance |
Max bars between the two pivots of a line. Bars allowed between the pair, `80`. | 80 |
TargetMultiplier |
Target = breakout + (height * multiplier). Line heights projected ahead, `1.0`. | 1.0 |
MaxActiveLines |
Max simultaneous TD trendlines on chart. Lines kept live at once, `8`. | 8 |
AtrPeriod |
ATR period for arrow offset. Bars behind the range reading, `14`. | 14 |
Display settings
| Setting | What it does | Default |
|---|---|---|
TargetMaxBars |
Target projection length in bars (forward). Bars the projection runs, `60`. | 60 |
ArrowGapAtrMult |
Arrow offset = ATR * mult. Mark gap in ranges, `0.50`. | 0.50 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Master switch, `true`. | on |
EnablePopup |
(see inputs panel) | on |
EnablePushNotify |
(see inputs panel) | off |
EnableEmail |
Mail on a break, `false`. | off |
EnableSound |
(see inputs panel) | off |
SoundFile |
(see inputs panel) | alert.wav |

Settings that fit your chart
Two hundred and fifty bars of scan needs a chart where pivots are meaningful. EURUSD H1 is the reference chart. That covers about ten days there. On M5 the pivots are noise. On H4 the scan reaches back two months.
When the Demark Trendline Trader Indicator fails
A level one pivot is only one bar either side, so it is common.
Eight live lines still crowd a busy chart.
A projected target is arithmetic and carries no evidence.
Objects drawn on the chart persist after a timeframe change.
Copy the compiled Demark Trendline Trader 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 Demark Trendline Trader Indicator for MT4 and MT5
The zip holds the compiled Demark Trendline Trader 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 TdLevel 1 require of a pivot?
One bar on each side sitting lower than the high in question. That is a loose test, so pivots are common. Setting it to two demands two bars each side and produces far fewer, more significant anchors.
Why does MaxPivotDistance 80 exist?
Because two pivots eighty bars apart already stretch what a trend line means. Beyond that the pair gets dropped rather than joined, which stops a line being drawn between two unrelated pieces of structure.
How is the target from TargetMultiplier worked out?
By measuring the line’s own height and adding that distance beyond the break point. A multiplier of one projects exactly one height ahead, and the result is drawn forward as an object with a label.
What does ArrowGapAtrMult 0.50 do?
It sets the mark’s distance from the candle as half the current range reading. On a fast day the arrows sit further out, which keeps them legible without a per-symbol point setting.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Demark Trendline Trader Indicator as one input. Always backtest before trading live.
Category: this is part of our Trend collection. Also, browse more Trend for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- For background on this concept, see Trader (finance) on Wikipedia.
- For broader market context, see Trendline at Investopedia.
