The luxalgo fair value gap indicator finds the small holes a fast move leaves behind. Take any three bars. If the first bar’s high sits under the third bar’s low, the middle bar covered ground nobody traded. That hole gets a rectangle, and the rectangle runs forward.
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 marker, Bearish FVG marker |
| Alerts | popup, push notification, email, sound |
| Inputs | 14 |
On screen
Rectangles, plus two optional markers.
`Bullish FVG marker` uses arrow 233 in dodger blue.
`Bearish FVG marker` uses arrow 234 in medium orchid.
Each gap gets a rectangle in the matching colour.
`FillRectangles` leaves them hollow by default.
`RectWidth` `2` sets the outline thickness.
- Bullish FVG marker: arrow, dodger blue, width 1, arrow code 233
- Bearish FVG marker: arrow, medium orchid, width 1, arrow code 234

How the calculation works
Three bars
The gap is the space between them. A bullish one needs the high two bars back to sit under the current low. A bearish one needs the low two bars back above the current high.
Size floor
Small holes get ignored. `MinGapPoints` `30` sets the smallest gap worth drawing. Below that a rectangle would be thinner than ordinary spread.
Keeping the chart clean
Two limits do it. `RectExtendBars` `30` runs each box forward that far. `MaxRectangles` `60` deletes the oldest once the count passes sixty.
How to judge the output
A box marks ground price crossed in one move.
Price often comes back through part of it.
A box that gets filled quickly says little.
Colour tells you which direction made the gap.
Boxes stop thirty bars right of where they formed.
The arrows only mark the bar the gap completed.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
`EnableAlerts` heads four routes and ships true with `EnablePopup`. Turn on `EnablePushNotify` to reach a phone, `EnableEmail` for mail, or `EnableSound` to play `SoundFile`. New gaps report once a bar.
Every Luxalgo Fair Value Gap Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
MaxRectangles |
max rectangles kept on chart. Boxes kept on chart, `60`. | 60 |
MinGapPoints |
minimum gap size in points to qualify. Smallest gap drawn, `30`. | 30 |
RectExtendBars |
bars to extend each rectangle forward. Bars each box runs on, `30`. | 30 |
FillRectangles |
OBJPROP_FILL toggle (LuxAlgo style: false). Solid fill, `false`. | off |
Display settings
| Setting | What it does | Default |
|---|---|---|
BullColor |
Up gap colour, `clrDodgerBlue`. | dodger blue |
BearColor |
Down gap colour, `clrMediumOrchid`. | medium orchid |
RectWidth |
Outline thickness, `2`. | 2 |
ShowArrows |
Mark the completing bar, `true`. | on |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Master switch, `true`. | on |
EnablePopup |
(see inputs panel) | on |
EnablePushNotify |
(see inputs panel) | off |
EnableEmail |
(see inputs panel) | off |
EnableSound |
Cue on a new gap, `false`. | off |
SoundFile |
(see inputs panel) | alert.wav |

Where the defaults make sense
A thirty-point floor means something different on every chart. EURUSD H1 is the reference chart. Gaps appear a few times a week there. On M5 the floor rejects most of them. On H4 nearly every fast move qualifies.
Where it comes unstuck
A gap is a chart pattern, not an order record.
Sixty boxes fill up fast on a busy chart.
A point floor does not adjust to volatility.
Nothing here tracks whether a gap later got filled.
Copy the compiled Luxalgo Fair Value Gap 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.
Download the Luxalgo Fair Value Gap Indicator for MT4 and MT5
The zip holds the compiled Luxalgo Fair Value Gap 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 does MinGapPoints 30 reject?
Any three-bar gap thinner than thirty points. On a five-digit major that is three pips, which is wide enough to clear ordinary spread. Raising it leaves only the gaps a real burst of movement created.
Why does MaxRectangles 60 delete old boxes?
Because objects accumulate and slow the terminal down. Sixty is enough to keep recent structure visible, and the oldest one goes as soon as a sixty-first appears.
How far does RectExtendBars 30 run a box?
Thirty bars right of the gap. That covers a day and a bit on H1. Past that the box stops, because a gap price never returned to in thirty bars has usually stopped mattering.
What does FillRectangles change?
Only the look. Left false, each box shows as an outline, which is the LuxAlgo style and keeps candles readable. Set true, the boxes shade solid and can hide the price action inside them.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Luxalgo Fair Value Gap Indicator as one input. Always backtest before trading live.
Category: this is part of our Signal and Forecast collection. Also, truly, browse more Signal and Forecast for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- For background on this concept, see Triparty required value on Wikipedia.
- For broader market context, see What Are Charts at StockCharts ChartSchool.
