The non repaint high low indicator marks the moment price sets a new extreme for its lookback window. It plots the rolling high and low as a channel. Then it arrows a bar only when that bar produces an extreme the previous bar lacked. Every value draws on bars older than the one it judges, so nothing shifts later.
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: HH Channel, LL Channel, Buy, Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 10 |
What the Non repaint high low Indicator draws on the chart
HH Channel traces the rolling highest high in dodger blue.
LL Channel traces the rolling lowest low in tomato.
Buy places a lime arrow beneath a bar that set a new high for the window.
Sell places a red arrow above a bar that set a new low.
- HH Channel: line, dodger blue, width 2
- LL Channel: line, tomato, width 2
- Buy: arrow, lime, width 2, arrow code 233
- Sell: arrow, red, width 2, arrow code 234

How the Non repaint high low Indicator calculates its values
Rolling the window over closed bars
N takes MathMax(2, `LookbackBars`), and the scan starts from high[i + 1] and low[i + 1] rather than the current bar. Walking outward through h and l across the window builds hh and ll from data strictly older than bar i. HHBuf and LLBuf then receive those values, so the channel at any bar describes what came before it.
Requiring a genuinely new extreme
A close above the channel is not enough on its own. The code also computes hh_prev and ll_prev from one bar further back, then sets isBreakHigh as close[i] above hh_prev. Comparing against the PREVIOUS window is what makes the arrow mark a new extreme rather than a level price has already been sitting above.
Filtering with confirmation and cooldown
K takes MathMax(1, `ConfirmationBars`). For each of those bars the code checks close[i + c – 1] against close[i + c] and clears isBreakHigh if the run is not consistently upward. CD takes MathMax(0, `CooldownBars`). The source header is explicit that the cooldown measures forward-walking distance as last_event_i minus i, which is the correct sign for an as-series loop and avoids looking into the future.
How to read the signals
An arrow means a fresh extreme, not merely price sitting outside the channel.
A flat channel boundary marks a level that has held for the whole window.
Raising the confirmation count removes single-bar spikes and delays every arrow by the same amount.
Because the channel excludes the current bar, an arrow can appear while price is still inside the line you see.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
Four channels sit beneath `EnableAlerts`: popup, push notification, email and sound, with `SoundFile` naming the clip. Popup ships on. The source header states alerts fire once per closed bar, which matches the tool’s use of settled data throughout.
Every Non repaint high low Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
LookbackBars |
N – lookback for high/low. Bars in the rolling high and low window, default `20`. Shorten it for a tighter channel and more frequent extremes. | 20 |
ConfirmationBars |
confirmation bars. Closed bars that must trend the same way before an arrow stamps, default `1`. Raise it to 2 or 3 to demand follow-through. | 1 |
CooldownBars |
min bars between same-side arrows. Minimum bars between two arrows on the same side, default `3`. | 3 |
Display settings
| Setting | What it does | Default |
|---|---|---|
ArrowOffsetPts |
arrow offset in points. Distance between candle and arrow, default `8.0` points. | 8.0 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
(see inputs panel) | on |
EnablePopup |
(see inputs panel) | on |
EnablePushNotify |
(see inputs panel) | off |
EnableEmail |
(see inputs panel) | off |
EnableSound |
(see inputs panel) | off |
SoundFile |
(see inputs panel) | alert.wav |

Settings that fit your chart
Extreme-tracking works anywhere price trends in bursts, which covers the majors, metals and indices. EURUSD H1 is the reference chart, where twenty bars is most of a session. On M5 the window turns over quickly and arrows come often. On H4 and above a new twenty-bar extreme is a meaningful event that may happen a few times a month.
When the Non repaint high low Indicator fails
New extremes cluster at the start of a move and dry up while it continues, because the channel keeps catching up with price.
The confirmation filter delays the arrow by exactly as many bars as you ask for, so a stricter setting means a later entry.
In a range the channel tightens and ordinary swings start setting extremes. That is when the cooldown does most of the work.
Copy the compiled Non repaint high low 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 high low Indicator: High Minus Low at StockCharts ChartSchool, High-yield stock on Wikipedia.
Download the Non repaint high low Indicator for MT4 and MT5
The zip holds the compiled Non repaint high low 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 makes this build non-repainting?
Each bar’s channel draws once on bars strictly older than itself, starting at i+1 rather than i. The code then writes the arrow at that bar and never moves it. Nothing in the calculation looks forward, so tomorrow cannot revise a value it printed today. The source header sets out this rule explicitly.
Why compare against hh_prev instead of the current channel?
Because a close above the current channel can happen while price has been above that level for several bars. hh_prev holds the window from one bar further back, so isBreakHigh only fires when the bar produces an extreme the previous bar did not have. That is what makes it a NEW high rather than a continued one.
What does ConfirmationBars actually check?
That the closes are moving the right way. For each of K bars the code compares close[i + c – 1] against close[i + c] and clears the signal if the sequence breaks. At the default `1` it is barely a filter. At 3 you get a short run of agreement before any arrow stamps.
Why does CooldownBars matter on a fast chart?
Because in a tightening range a series of bars can each set a marginal new extreme, and every one would otherwise print an arrow. `CooldownBars` at `3` blocks a second same-side arrow for three bars. On M5 and below, raising it is usually the first adjustment worth making.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Non repaint high low 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
- The core method is documented in High Minus Low at StockCharts ChartSchool.
- Additional market context is at High-yield stock on Wikipedia.
