The non repaint fvg indicator looks for a genuine three candle imbalance. A bullish gap needs the current low to sit clean above the high from two bars back, leaving a band of price no candle traded through. Bullish FVG and Bearish FVG mark those bars, with equal highs and lows tagged separately.
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 | 2: Bullish FVG, Bearish FVG |
| Alerts | popup, push notification, email, sound |
| Inputs | 15 |
What the Non repaint fvg Indicator draws on the chart
Bullish FVG marks a bar whose low cleared the high from two bars earlier, on an up candle.
Bearish FVG marks the mirror case where the high sat under the low from two bars back.
Rectangle objects fill each gap band, capped by MaxGapsToDraw.
Trend line objects mark equal highs and lows as liquidity when ShowLiquidity stays on.
- Bullish FVG: arrow, lime, width 2, arrow code 233
- Bearish FVG: arrow, red, width 2, arrow code 234

How the Non repaint fvg Indicator calculates its values
The three candle test
A bullish gap compares the current bar low against the high two bars back. If the low sits above that high, no candle covered the range in between, and that untouched band is the imbalance.
The candle also has to close up. The bearish case reverses both tests. This is the actual gap definition rather than a two candle impulse standing in for it.
Sizing the marker
The offset between a marker and its candle comes from ATR over ATRPeriod bars multiplied by ArrowOffsetATR, with a small floor so it never collapses to nothing on a very quiet chart.
Scaling by ATR keeps the spacing sensible whether you load a major pair or something far more volatile.
Equal highs and lows
Alongside the gaps, the code scans StructureLookback bars for highs that match within a tolerance, and separately for matching lows.
That tolerance runs at a tenth of ATR with a ten point floor, so what counts as equal scales with the market rather than sitting at a fixed pip figure.
How to read the signals
A gap band shows a range price skipped, which is why traders watch for a return into it.
The three candle rule lands the marker on the third bar, once the gap completes.
Liquidity marks pair up highs or lows that finished close enough to count as equal.
MaxGapsToDraw caps the drawn bands, so the oldest disappear as new ones form.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
Alerts cover popup, push, email and sound when a gap completes. A bar time check keeps it to one alert per closed bar.
Every Non repaint fvg Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
StructureLookback |
bars used to anchor the most-recent zones. StructureLookback is how many bars the equal high and low scan covers, 50 by default. | 50 |
ATRPeriod |
ATR used for the offset / liquidity tolerance. ATRPeriod is the volatility window behind both the spacing and the equal-level tolerance, 14 by default. | 14 |
Display settings
| Setting | What it does | Default |
|---|---|---|
ShowOrderBlocks |
mark gap rectangles on the chart. ShowOrderBlocks draws the block objects alongside the gaps. It defaults to true. | on |
ShowLiquidity |
mark equal-high / equal-low liquidity pools. ShowLiquidity draws the equal high and low markers, also on by default. | on |
MaxGapsToDraw |
most recent gaps kept on screen. MaxGapsToDraw caps how many gap bands stay on the chart, 30 by default. | 30 |
ArrowOffsetATR |
arrow distance from candle in ATR units. ArrowOffsetATR spaces a marker from its candle as a fraction of ATR, 0.4 by default. | 0.4 |
BullColor |
(see inputs panel) | lime |
BearColor |
(see inputs panel) | red |
LiquidityColor |
(see inputs panel) | gold |
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
The screenshot uses EURUSD H1. Three candle gaps appear on any timeframe, but the ones worth watching need enough range to matter, which favours M15 and above. On M1 the chart fills with tiny bands that price crosses within minutes. On daily charts a gap is rare and usually sits around a weekend.
When the Non repaint fvg Indicator fails
A gap describes what price skipped, never a promise it returns. Price never revisits many of them.
The test measures the gap without measuring its size, so a one point imbalance marks exactly like a large one.
Weekend gaps qualify under the same rule as intraday ones, though they form for an entirely different reason.
Equal highs count as equal within a tenth of ATR, which on a volatile day is a wide tolerance.
Copy the compiled Non repaint fvg 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 fvg Indicator: Security analysis on Wikipedia, ividya (VIDYA) at the MQL5 Documentation.
Download the Non repaint fvg Indicator for MT4 and MT5
The zip holds the compiled Non repaint fvg 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 exactly makes a Bullish FVG on this build?
The current bar low has to sit above the high from two bars back, and the candle has to close up. That leaves a band of price no candle traded through, which is the actual three candle imbalance rather than a two candle impulse used as a substitute for one.
Why does Bullish FVG land on the third bar?
The gap does not complete until then. The test needs the bar from two back and the current bar together, so the earliest the condition can hold true is the third candle. Once that bar closes the gap holds its shape and the marker stays put.
How close do two highs have to be to count as liquidity?
Within a tenth of the current ATR reading, floored at ten points. Scaling the tolerance means what counts as equal grows on a volatile day and tightens on a quiet one, rather than using a fixed pip figure that suits only one market.
Does ArrowOffsetATR change which bars get marked?
No. It only sets how far a marker sits from its candle, as four tenths of the ATR reading by default with a small floor underneath. The gap test itself uses the highs and lows alone and ignores the offset entirely.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Non repaint fvg Indicator as one input. Always backtest before trading live.
Category: this is part of our Smart Money collection. Browse more Smart Money for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- Learn more about the underlying method in Security analysis on Wikipedia.
- For wider market background, see ividya (VIDYA) at the MQL5 Documentation.
