Non Repaint Channel Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

A channel that includes the current bar can never be broken by it. The non repaint channel indicator avoids that trap: it builds its twenty-bar high and low from bars that have already closed, then marks the first close that escapes. Once a mark prints, nothing can move it.

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 5: Upper Channel, Lower Channel, Midline, Buy, Sell
Alerts popup, push notification, email, sound
Inputs 10

On the chart: plots and colours

Three lines and two marks on price.

`Upper Channel` traces dodger blue at width 2.

`Lower Channel` traces orange red at width 2.

`Midline` runs dotted goldenrod between them.

`Buy` marks a break up, lime and three pixels thick.

`Sell` marks a break down in red.

  • Upper Channel: line, dodger blue, width 2
  • Lower Channel: line, orange red, width 2
  • Midline: line, goldenrod
  • Buy: arrow, lime, width 3, arrow code 233
  • Sell: arrow, red, width 3, arrow code 234
non repaint channel indicator: The channel with breakout marks, EURUSD H1.
The channel with breakout marks, EURUSD H1.

How each value gets built

Building the channel

`ChannelPeriod` `20` finds the highest high and lowest low of the twenty bars before the current one. The midpoint of the two draws the middle line.

The break

A close above the upper edge, after the close before it sat inside, prints a buy. A close below the lower edge prints a sell.

Spacing

`CooldownBars` `5` keeps same-side marks apart. `ArrowOffsetATR` `0.6` sets each mark six tenths of a 14-bar range from the bar.

How to read it

Edges step up or down as new extremes appear.

A flat edge means twenty bars without a new extreme.

Marks land on the first close outside.

Follow-through closes print nothing more.

`ShowMidline` hides the dotted centre line.

Warm-up needs about twenty-four bars.

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

A close breaking out of the channel is what reports, once per closed bar. `EnableAlerts` is the main switch and a terminal popup shows it; handset, inbox and speaker routes behind `SoundFile` start off.

Every Non Repaint Channel Indicator input

Core settings

Setting What it does Default
ChannelPeriod Bars used for highest-high / lowest-low. Bars behind each edge, `20`. 20
CooldownBars Min bars between consecutive same-side arrows. Minimum spacing for repeat marks, `5`. 5

Display settings

Setting What it does Default
ArrowOffsetATR Arrow vertical offset as multiple of ATR(14). Mark gap as a range share, `0.6`. 0.6
ShowMidline Draw the centre line, `true`. on

Alert settings

Setting What it does Default
EnableAlerts Main switch for break messages, `true`. on
EnablePopup Terminal popup route, `true`. on
EnablePushNotify Handset route, `false`. off
EnableEmail Inbox route, `false`. off
EnableSound Speaker route, `false`. off
SoundFile Speaker clip, `”alert.wav”`. alert.wav
non repaint channel indicator: Inputs panel, the channel length above spacing.
Inputs panel, the channel length above spacing.

Best home for this one

A twenty-bar channel on hourly bars covers about a day of trade. EURUSD H1 is the reference chart. On M15 breaks come several times a day. On D1 the channel spans a month and breaks are rare.

The downsides

Many breaks fall back inside within a few bars.

Choppy days break both edges in turn.

Edges built from extremes react to single spikes.

Five bars of cooldown can skip a real second break.

Copy the compiled Non Repaint Channel 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 Non Repaint Channel Indicator: Donchian channel on Wikipedia, Price Channels at StockCharts ChartSchool.

Download the Non Repaint Channel Indicator for MT4 and MT5

The zip holds the compiled Non Repaint Channel 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

Why does Upper Channel exclude the current bar?

So the current bar can actually break it. If its own high counted, the edge would rise with every new high and a breakout could never register.

Why can a Buy mark here never repaint?

The edges come from finished bars and the test waits for a closed bar. Once a mark prints, no later tick can change the channel under it or remove the mark.

How many bars feed ChannelPeriod 20?

Twenty, all of them before the current bar, which is about a trading day on the hourly chart. Longer settings give fewer, larger breaks and a wider channel to escape.

What does CooldownBars 5 skip?

Any second same-side break within five bars of the first. That keeps one mark per move instead of a row of marks on each new extreme.

Are results guaranteed?

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

Category: this is part of our Signal and Forecast collection. Browse more Signal and Forecast 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