Non Repaint Renko Indicator: Period 7 Regression Line

Written by Dominic Walsh · Published · Last updated

The non repaint renko indicator plots a single line, labelled Non, on the regular candlestick chart. It does not rebuild a Renko brick chart. Under the hood it fits a short least-squares regression to the last Period closes. Each value locks in once its bar closes.

This build ships as non-repaint-renko-indicator-indicator-forexmt4systems.ex4 for MT4 and non-repaint-renko-indicator-indicator-forexmt4systems.ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 1: Non
Alerts popup, push notification, email, sound
Inputs 7

What the Non Repaint Renko Indicator draws on the chart

Non (pale green) is the only plotted line. Each value comes from fitting a straight least-squares line to the Period closes behind that bar.

  • Non: plot, pale green
EURUSD H1 candlestick chart: the non repaint renko indicator's Non line, not a brick chart.
EURUSD H1 candlestick chart: the non repaint renko indicator’s Non line, not a brick chart.

How the Non Repaint Renko Indicator calculates its values

What the code actually fits

Non comes from one calculation per bar. For every bar i, the code loops across a Period-wide window of k values, treating close[i – k] as y and k as x. It sums four running totals a least-squares line needs: sx, sy, sxy and sxx.

The window sets x = 0 at the newest bar, so the intercept term alone becomes Non. There is no brick sizing and no rebuilt time axis anywhere in the calculation. Non behaves like a short regression line, not a Renko series.

Alerting on a line cross

Once Non updates for the newest bars, a check runs against the two most recently closed ones. Close two bars back sitting at or below Non, followed by close one bar back sitting above it, is what fires a BUY message.

Price crossing down through Non gives the mirrored SELL trigger. Both checks look only at closed bars, and each runs once per new bar, guarded by a stored timestamp.

No brick rebuild happens either

Renko charts normally rebuild their own bricks from scratch as price moves, independent of time. Nothing like that runs here. The code only ever touches the regular time-based bars MetaTrader feeds it.

On a fresh chart the fit runs from Period forward, one bar at a time. After that, each tick only scores whichever bars prev_calculated has not reached yet.

How to read the signals

Treat Non like a short trend line. Price staying above it favors the recent up-slope, and price staying below it favors the recent down-slope.

A cross from at or below Non to above it is the bullish trigger. The alert logic checks that on the last two closed bars.

Period defaults to just 7 bars, so Non hugs price closely. It can cross back and forth several times in a quiet session.

Each tick only extends the line onto bars a prior pass has not scored. A finished bar’s Non value stays put once the code has written it.

A trader watching for a clean setup usually waits for Non to hold its new side for a bar or two before acting, rather than reacting to the very first cross.

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

EnableAlerts turns on popup, push, email and sound alerts as a group. The cross check fires at most once per newly closed bar.

Every Non Repaint Renko Indicator input

Core settings

Setting What it does Default
Period Period sets how many closes feed the least-squares fit behind Non. It defaults to 7. A larger value produces a slower, smoother line, since the fit spans more history on the regular chart. 7

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
Inputs panel for the non repaint renko indicator: Period sits above the four alert toggles.
Inputs panel for the non repaint renko indicator: Period sits above the four alert toggles.

Settings that fit your chart

The screenshot runs on EURUSD H1. It uses the standard chart, since the indicator does not build its own Renko time axis. A 7-bar fit reacts fast on that timeframe. The same math carries over to any symbol or timeframe MT4 and MT5 support. Raising Period well past 7 slows the line down without touching anything else in the setup.

When the Non Repaint Renko Indicator fails

A short fit can whipsaw. The 7-bar window crosses its own line several times during a ranging stretch, so the alert can fire without marking a real turn.

The fit reads only closes. A bar with a long wick but a small body can still cross Non, even when price never settled decisively on one side.

Only the fitted endpoint gets plotted, never the slope behind it. A gentle drift and a sharp one can leave Non sitting at a similar level on a given bar.

The fit treats every bar in the window equally. One outlier bar near the edge of that window can pull Non as much as several ordinary bars combined.

Copy non-repaint-renko-indicator-indicator-forexmt4systems.ex4 into MQL4/Indicators and non-repaint-renko-indicator-indicator-forexmt4systems.ex5 into MQL5/Indicators, then restart the terminal and drag the Non Repaint Renko Indicator onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Download the Non Repaint Renko Indicator for MT4 and MT5

The zip non-repaint-renko-indicator-indicator-forexmt4systems.zip holds non-repaint-renko-indicator-indicator-forexmt4systems.ex4, non-repaint-renko-indicator-indicator-forexmt4systems.ex5 and a short README, compiled files only. 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

Does this indicator build Renko bricks?

No. The plot is a single least-squares regression line called Non. It is fitted to the last Period closes on the regular candlestick chart. There is no brick-size input and no offline chart in the code. Despite the product name, the output is a trend line, not a Renko series. A candlestick chart underneath keeps its normal shape too, since nothing in the calculation touches how bars form.

What does raising Period do to the Non line?

Period sets the window size behind the least-squares fit. The default is 7 closes. A larger Period pulls in more history for each fit, which smooths Non into a slower line. It reacts to fewer swings but confirms a slope change later than the default would. Every window uses whatever closes sit within reach of the current bar on the regular chart.

Can I turn off the sound alert and keep the popup?

Yes. EnableSound and EnablePopup are separate switches under the alert configuration group, along with EnablePushNotify and EnableEmail. Any combination of the four can stay on or off. Only the master EnableAlerts switch has to be true for the ones you pick to fire. Nothing about the calculation cares whether that bar’s wick pointed up or down, only where its close landed.

Why does the SELL alert only look at two bars back and one bar back?

The alert block only trusts bars that have already closed. It compares close two bars back against Non at that bar, then close one bar back against Non the next bar. Both values are fixed by the time the check runs, which keeps the SELL message from repainting. The same guard also stops a second BUY or SELL from firing off the same pair of bars more than once.

Does switching timeframes rebuild the Non line the way a Renko chart would rebuild bricks?

No. Changing timeframe just changes which bars MetaTrader feeds into the same fit; nothing in the code builds a separate brick-based series behind the scenes. Non recalculates from the new set of closes the way it would after any other chart change, using the same Period-wide least-squares fit described above.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Non Repaint Renko 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