MT4 Indicator Central
Levels & Market Structure Free · MIT

Auto Trend Lines Indicator for MT4

Category
Levels & Market Structure
Platform
MetaTrader 4, MetaTrader 5
Repaints?
See the honest review below
Licence
MIT
Inputs
10
Price
Free
MetaTrader 4 chart with the Auto Trend Lines indicator drawing colored zigzag swing lines and extended trend channels across long, medium, and short term pivots.
Auto Trend Lines in MetaTrader 4. Open-source (MIT), by TradingFinder.com.
// at a glance

Auto Trend Lines by TradingFinder is a free MT4 and MT5 indicator that automatically plots zigzag swing lines and extended trend channels from recent pivots, on three horizons at once (long, medium, short). It is a visual structure-mapping tool for discretionary traders who want trend lines drawn for them, not a signal or trading system.

If you draw trend lines by hand and want a consistent starting point, Auto Trend Lines does the mechanical part for you. It scans recent price for swing pivots and connects them into zigzag and trend lines on three separate horizons at once, then keeps the most recent segment updated as new bars print.

What is Auto Trend Lines, and what does it do in MT4?

Auto Trend Lines is a chart-window indicator for MetaTrader 4 and MetaTrader 5, published by TradingFinder.com (TFLab) and released under the MIT licence. It detects swing highs and swing lows automatically and draws two kinds of objects: a zigzag line that links confirmed pivots into a stair-step picture of market structure, and a trend line that connects the last two same-type pivots and extends it to the right as a forward guide, bracketed by a thin dotted channel.

It runs three of these engines side by side, each tuned to a different swing size, so on one chart you can see a long-term skeleton, a medium-term structure, and a short-term zigzag in different colours. It does not generate buy or sell signals, place trades, or fire alerts. It is a drawing aid that turns recent price action into clean, repeatable lines so you can read structure faster.

For each of its three horizons the indicator tracks a floating high and a floating low using MT4's iHighest and iLowest over a configurable pivot_period window. A pivot is only confirmed when two filters are both satisfied: the move away from the prior extreme must have taken longer than pivot_period bars, and the price distance of the swing must be at least one ATR(360) of the current symbol. This twin time-and-volatility filter is what stops it from marking every tiny wiggle as a turn, and it is why a higher pivot_period produces fewer, larger swings.

Once a new pivot confirms, the indicator draws a zigzag segment from the previous pivot to the new one, then connects the two most recent same-type pivots (high-to-high or low-to-low) into a trend line that is extended to the right. Around that trend line it adds two dotted parallel lines offset by 0.25 ATR above and below, forming a simple channel. The most recent, still-forming leg can shift until its pivot meets the confirmation filters, so the newest segment does redraw on the chart while older confirmed pivots stay fixed. When the platform loads more history or refreshes, the indicator clears its objects and rebuilds the whole picture from the available bars.

Which Auto Trend Lines inputs matter most?

The inputs are grouped by horizon (long, medium, short) and let you turn each layer on or off, set how big a swing it looks for, and restyle the lines. These are the inputs you will actually touch.

InputDefaultWhat it controls
show_long_lineTrueShows or hides the long-term zigzag line. Turn it off if you only want medium and short structure.
long_period36Pivot lookback for the long-term swings. Larger values mean fewer, bigger swings and a slower-reacting line.
show_long_trend_lineTrueDraws the extended long-term trend line and its dotted channel from the last two same-type pivots.
long_colorclrCornflowerBlueColour of the long-term zigzag line.
long_line_width2Pixel width of the long-term zigzag line, set thicker so the main structure stands out.
show_medium_lineTrueShows or hides the medium-term zigzag line.
medium_period21Pivot lookback for medium-term swings. The middle layer between the long skeleton and the short noise.
show_short_lineTrueShows or hides the short-term zigzag, which marks the smallest, most frequent swings.
short_period9Pivot lookback for short-term swings. Low values react fast but mark many minor turns.

How do you add Auto Trend Lines to MetaTrader 4?

  1. Unzip the download and locate the indicator file from the zip (the .mq4 for MT4 or .mq5 for MT5).
  2. In MetaTrader, open File then Open Data Folder.
  3. Open the MQL4 folder, then the Indicators folder (use MQL5 then Indicators on MetaTrader 5).
  4. Copy the indicator file into that Indicators folder.
  5. Restart MetaTrader, or right-click Indicators in the Navigator panel and choose Refresh.
  6. Drag Auto Trend Lines from the Navigator onto any chart and confirm the inputs in the dialog.
  7. Adjust the long, medium, and short pivot periods and colours to suit your chart, then click OK.

Where does Auto Trend Lines help, and where does it fall short?

What Auto Trend Lines does well, and where it falls short, with nothing hidden.

  • Free and MIT-licensed, so you can use, study, and modify the source without restrictions
  • Draws three horizons of structure at once, giving a quick multi-scale read of the trend on one chart
  • Uses both a time filter and an ATR volatility filter, so it ignores trivial wiggles instead of zigzagging on every bar
  • Every layer can be toggled and recoloured, so you can run just the long-term skeleton or all three
  • Works on any symbol and timeframe in both MetaTrader 4 and MetaTrader 5
  • The newest, still-forming swing leg redraws until its pivot confirms, so the most recent line can move; do not treat the latest segment as final
  • It describes past and current structure and does not predict price, generate signals, or place trades
  • Pivots only confirm after enough time and an ATR-sized move have passed, so trend lines lag the actual turning point
  • All three layers on at once can clutter a small or busy chart; you will often want to disable the short-term zigzag
  • The ATR threshold is hard-coded to a 360-period ATR, so you cannot directly tune the noise filter beyond changing the pivot periods
  • Re-draws all objects whenever history reloads, which can briefly flicker the chart on lower-end machines
// free download

Download Auto Trend Lines free

Enter your email and we will send you Auto Trend Lines for MetaTrader 4, packaged with its original MIT licence and a credit to TradingFinder.com. Come back for any of the other free tools whenever you want one.

We never share or sell your email. One-click unsubscribe in every message.

Auto Trend Lines: questions traders ask

Does Auto Trend Lines repaint?

The most recent, unconfirmed swing leg can move until its pivot is confirmed by the time and ATR filters, so the newest line redraws. Once a pivot confirms, that segment stays fixed. Treat the latest leg as provisional, not the confirmed older structure.

Does it place trades or give buy and sell signals?

No. It only draws zigzag lines and trend channels on the chart. There are no arrows, no alerts, and no order entry. Any trading decision is entirely yours.

Is it free?

Yes. It is released by TradingFinder.com (TFLab) under the MIT licence, so it is free to use and modify, with the source code included.

Does it work on MT5?

Yes. The download includes both a MetaTrader 4 (.mq4) and a MetaTrader 5 (.mq5) version. Install the file that matches your platform into the Indicators folder.

How do I get fewer or larger swing lines?

Increase the pivot period for that layer (for example raise long_period from 36), or simply hide the short-term zigzag with show_short_line set to false. Larger pivot periods mark fewer, bigger swings.

Which timeframe is best?

It runs on all timeframes. Because pivots need an ATR-sized move and a minimum number of bars to confirm, M15 through H4 charts tend to produce cleaner, less cluttered structure than very low timeframes.


More free MT4 tools