Support Resistance Line Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

Most charts carry more levels than a trader can use. The support resistance line indicator builds levels from clustered swings, then keeps just two lines on the chart: the nearest level above price and the nearest below. When a close clears one by a small buffer, it marks the break.

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: Resistance Line, Support Line, Break Up, Break Down
Alerts popup, push notification, email, sound
Inputs 15

What gets drawn, and where

Two stepped lines, level rays and two marks.

`Resistance Line` steps in orange red at width 2.

`Support Line` steps in dodger blue at width 2.

`ShowLevels` rays every tracked level as a dotted line.

`Break Up` prints lime with arrow 233.

`Break Down` prints red with arrow 234.

  • Resistance Line: line, orange red, width 2
  • Support Line: line, dodger blue, width 2
  • Break Up: arrow, lime, width 2, arrow code 233
  • Break Down: arrow, red, width 2, arrow code 234
support resistance line indicator: Nearest levels with buffered breaks, EURUSD H1.
Nearest levels with buffered breaks, EURUSD H1.

Following the source

Levels

`SwingBars` `5` confirm each swing over the last `Lookback` `200` bars. Swings within `TolMult` `0.55` of a range merge, and a level needs `MinStrength` `2` touches.

Two lines

Each bar, the orange line sits at the nearest level above the close. Its blue partner sits at the nearest level below.

Break

A close beyond a level by `BreakMult` `0.10` of a range, after a close inside it, prints a mark. `CooldownBars` `4` spaces same-side marks.

What it is telling you

The orange step is the next ceiling.

The blue step is the next floor.

Steps jump when price passes a level.

Marks need a clear close beyond the level.

`MaxLevels` `40` caps the tracked levels.

The forming bar is left alone.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

Buffered breaks report once per closed bar through `EnableAlerts`. The popup is live from the start and the other routes wait in the inputs.

Every Support Resistance Line Indicator input

Core settings

Setting What it does Default
Lookback Bars scanned for swing structure. Bars scanned for swings, `200`. 200
SwingBars Fractal half-width (bars each side). Bars on each side of a swing, `5`. 5
MinStrength Minimum touches for a level to plot. Touches a level needs, `2`. 2
AtrPeriod ATR period for cluster tolerance. Range window, `14`. 14
TolMult Level merge tolerance (x ATR). Merge distance in ranges, `0.55`. 0.55
BreakMult Break confirmation buffer (x ATR). Break buffer in ranges, `0.10`. 0.10
CooldownBars Bars between same-direction alerts. Bars between same-side marks, `4`. 4
MaxLevels Max active levels tracked. Levels tracked at most, `40`. 40

Display settings

Setting What it does Default
ShowLevels Draw horizontal level objects. Ray every tracked level, `true`. on

Alert settings

Setting What it does Default
EnableAlerts Master alert switch. Master alert switch, `true`. on
EnablePopup Popup alert. on
EnablePushNotify Mobile push notification. off
EnableEmail Email alert. off
EnableSound Sound alert. off
SoundFile (see inputs panel) alert.wav
support resistance line indicator: Inputs panel, level building above the break settings.
Inputs panel, level building above the break settings.

Where the defaults make sense

Five-bar swings give levels that last for days on hourly charts. EURUSD H1 is the reference chart. On M15 the lines step often. On D1 they sit at the levels traders already watch.

What to be wary of

Nearest is not the same as strongest.

A small buffer still admits false breaks.

Levels change as old swings leave the window.

Mobile, email and sound start switched off.

Copy the compiled Support Resistance Line 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.

Related on forexmt4systems.com: Support and Resistance Strategy.

Download the Support Resistance Line Indicator for MT4 and MT5

The zip holds the compiled Support Resistance Line 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.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

What does BreakMult 0.10 stop?

Closes that clear a level by a hair. The close must sit a tenth of a range beyond it, so a bar that ends one pip through the line does not count as a break.

Why does the Resistance Line jump?

It always shows the nearest level above the close. When price closes past that level, the next one up becomes the nearest, and the line steps to it.

How does TolMult 0.55 merge swings?

Swings within about half of the 14-bar range count as one level. Each merge adds a touch, and only levels with two or more touches are used.

Does CooldownBars 4 block the other side too?

No. Buys and sells count separately. A break up blocks another break up for four bars, while a break down can still print straight away.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Support Resistance Line Indicator as one input. Always backtest before trading live.

Category: this is part of our Support and Resistance collection. Browse more Support and Resistance for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment