The fair value gaps setup 01 indicator asks for two things at once. An unfilled gap must sit in recent history, and the current bar must engulf the one before it. Only then does a mark appear.
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: FVG01 BUY, FVG01 SELL, FVG Bull Mid, FVG Bear Mid |
| Alerts | popup, push notification |
| Inputs | 8 |
What the Fair Value Gaps Setup 01 Indicator draws on the chart
`FVG01 BUY` uses arrow 233 in lime and `FVG01 SELL` uses 234 in red.
A dodger blue `FVG Bull Mid` line marks the middle of a bullish gap.
An orange red `FVG Bear Mid` line does the same on the bearish side.
Marks sit `InpArrowOffsetPoints` `10` points from the candle.
- FVG01 BUY: arrow, lime, width 2, arrow code 233
- FVG01 SELL: arrow, red, width 2, arrow code 234
- FVG Bull Mid: line, dodger blue, width 1
- FVG Bear Mid: line, orange red, width 1

How the Fair Value Gaps Setup 01 Indicator calculates its values
Finding the gap
The code scans `InpLookbackBars` `30` bars for a three-bar gap. `InpMinGapPoints` `5` throws out dust, and `InpAtrMultMaxGap` `3.0` rejects anything wider than three times the reading from `InpAtrPeriod` `14`.
The gap must still be open
A gap price already revisited stops counting. The check walks forward through the bars in between and looks for a touch within a tenth of the gap size.
Then the bar has to engulf
`InpEngulfBodyRatio` `1.05` asks the current body to beat the previous one by five percent. Price also has to sit in the right half of the gap. Those two tests plus the gap make three conditions.
How to read the signals
A mid line shows where an open gap sits, and it stops when the gap fills.
Three conditions have to line up, so marks are scarce by design.
The ATR check ties gap size to recent range rather than a fixed number.
`InpMinGapPoints` `5` removes gaps too small to matter.
Alert channels in this build: popup and push notification, one message per closed bar.
`InpAlertEnabled` ships true and shows a terminal popup. `InpPushEnabled` starts false and adds a phone notification once you switch it. Those two routes are all this build carries, with no mail or sound option. The check reads a closed bar.
Every Fair Value Gaps Setup 01 Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
InpLookbackBars |
Bars to scan back for active FVG. Bars scanned back for an open gap, default `30`. | 30 |
InpMinGapPoints |
Min gap size in points (filter dust gaps). Smallest gap worth keeping, in points, default `5`. | 5 |
InpEngulfBodyRatio |
Engulfing body >= prior body x ratio. How much the body must beat the previous one, default `1.05`. | 1.05 |
InpAtrPeriod |
ATR filter period. Bars in the range average used as a filter, default `14`. | 14 |
InpAtrMultMaxGap |
Reject gap > ATR*mult (noise filter). Widest gap allowed, in range units, default `3.0`. | 3.0 |
Display settings
| Setting | What it does | Default |
|---|---|---|
InpArrowOffsetPoints |
Arrow distance from candle in points. Gap between a mark and the candle, in points, default `10`. | 10 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
InpAlertEnabled |
Audible alert on signal. Terminal popup on a new mark, default `true`. | on |
InpPushEnabled |
Push alert on signal. Phone push on a new mark, default `false`. | off |

Settings that fit your chart
Gaps need bars with real bodies behind them. EURUSD H1 is the reference chart, where `InpLookbackBars` `30` covers more than a day. On M1 most gaps fall under `InpMinGapPoints`. H4 charts leave fewer gaps but wider ones.
When the Fair Value Gaps Setup 01 Indicator fails
Three conditions at once mean long quiet stretches with no marks at all.
The range filter rejects a wide gap, which is sometimes the interesting one.
A tenth of the gap counts as a touch, so a near miss can void a gap that still matters.
Copy the compiled Fair Value Gaps Setup 01 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 Fair Value Gaps Setup 01 Indicator: Value investing on Wikipedia, Lowest Low Value at StockCharts ChartSchool.
Download the Fair Value Gaps Setup 01 Indicator for MT4 and MT5
The zip holds the compiled Fair Value Gaps Setup 01 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 InpLookbackBars 30 scan?
The last thirty bars, looking for a three-bar gap that price has not yet revisited. Anything older falls out of range. Widen it and older gaps stay eligible, which raises the number of marks and their average age.
What does InpEngulfBodyRatio 1.05 demand?
That the current body measures at least five percent more than the previous body. It is a mild filter rather than a strict one. Raise it toward 1.5 and only decisive candles qualify, which cuts the mark count sharply.
Why filter the gap against InpAtrPeriod?
Because a gap of twenty points means one thing in a quiet session and something else in a fast one. `InpAtrMultMaxGap` compares gap size with the fourteen-bar range average, so the filter travels between instruments and sessions.
Does InpPushEnabled start switched on?
No. Only `InpAlertEnabled` arrives true, so a terminal popup is the default. Switch `InpPushEnabled` to add a phone notification. There is no mail or sound route in this file, so those two are the complete set.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Fair Value Gaps Setup 01 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
- Learn more about the underlying method in Value investing on Wikipedia.
- For wider market background, see Lowest Low Value at StockCharts ChartSchool.
