Fair Value Gap Sessions Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

A gap formed at three in the morning is not the same thing as one formed at the London open. The fair value gap sessions indicator takes that seriously: it only records gaps that form inside the hours you name, skips weekends, and drops anything too small against the current range.

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: FVG Bull (Session), FVG Bear (Session)
Alerts popup
Inputs 15

What the Fair Value Gap Sessions Indicator draws on the chart

Two arrow plots plus boxes.

`FVG Bull (Session)` uses arrow 233 in dodger blue.

`FVG Bear (Session)` uses arrow 234 in orange red.

`InpDrawBoxes` shades each gap in its own colour.

Boxes run `InpBoxLifeBars` `80` bars forward.

Marks sit `InpArrowOffsetPts` `20` points clear.

  • FVG Bull (Session): arrow, dodger blue, width 2, arrow code 233
  • FVG Bear (Session): arrow, orange red, width 2, arrow code 234
fair value gap sessions indicator: Session gap boxes and marks on the EURUSD H1 chart.
Session gap boxes and marks on the EURUSD H1 chart.

How the Fair Value Gap Sessions Indicator calculates its values

The gap itself

Three bars, two edges. A bullish gap needs the current low above the high two bars back. The space between those two prices is what gets recorded.

Session filtering

Hours decide what counts. `InpLondonStartHour` `8` to `InpLondonEndHour` `16` covers one window, `InpNYStartHour` `13` to `InpNYEndHour` `21` the other. Both read server time.

Size against range

`InpMinGapATRFrac` `0.20` of the `InpATRPeriod` `14` reading is the floor. Tying it to range rather than points keeps the filter sensible on any symbol.

How to read the signals

Every gap shown formed inside a named session.

The two windows overlap between thirteen and sixteen.

`InpSkipWeekend` keeps Saturday and Sunday bars out.

Colour tells you which direction made the gap.

A box that price has crossed says its level was used.

Marks appear on the bar that completed the gap.

Alert channels in this build: popup, one message per closed bar.

`InpAlertOnNew` is the only alert control and ships false, so the tool stays silent until you switch it on. It then raises one terminal message per bar for a new session gap. No phone, mail or sound route exists here.

Every Fair Value Gap Sessions Indicator input

Core settings

Setting What it does Default
InpUseLondon Filter: include London session. Count London gaps, `true`. on
InpLondonStartHour London start hour (server time). London window opens, `8`. 8
InpLondonEndHour London end hour (server time). London window shuts, `16`. 16
InpUseNewYork Filter: include New York session. Count New York gaps, `true`. on
InpNYStartHour New York start hour (server time). New York window opens, `13`. 13
InpNYEndHour New York end hour (server time). 21
InpSkipWeekend Skip Saturday/Sunday bars. Drop weekend bars, `true`. on
InpMinGapATRFrac Min gap as fraction of ATR(14). Least gap size in ranges, `0.20`. 0.20
InpATRPeriod ATR period for size filter. Window behind the range figure, `14`. 14
InpBoxLifeBars Box length in bars. Bars each box runs, `80`. 80

Display settings

Setting What it does Default
InpArrowOffsetPts Arrow offset in points. 20
InpDrawBoxes Draw FVG rectangle boxes. on
InpBullBoxColor (see inputs panel) dodger blue
InpBearBoxColor (see inputs panel) orange red

Alert settings

Setting What it does Default
InpAlertOnNew Alert on new session FVG (one per bar). Alert on a fresh gap, `false`. off
fair value gap sessions indicator: Inputs panel with the session hours and InpMinGapATRFrac.
Inputs panel with the session hours and InpMinGapATRFrac.

Settings that fit your chart

Session hours only mean something where a session fits in several bars. EURUSD H1 is the reference chart. Each window is eight bars there. On M15 you watch the gaps form. On H4 the two windows collapse into a handful of bars.

When the Fair Value Gap Sessions Indicator fails

Hours read the broker clock rather than GMT.

The two windows overlap, so a gap can belong to both.

A gap on a chart is not evidence of orders.

Boxes stop after eighty bars whether filled or not.

Copy the compiled Fair Value Gap Sessions 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 Fair Value Gap Sessions Indicator for MT4 and MT5

The zip holds the compiled Fair Value Gap Sessions 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.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

Why filter gaps by InpLondonStartHour at all?

Because a gap formed in thin overnight trade rarely carries the same weight as one formed when London is active. Restricting the search to named hours removes the ones nobody was there to create.

Do InpLondonEndHour and InpNYStartHour overlap?

Yes, between thirteen and sixteen on the server clock. A gap in that stretch satisfies both filters, which is harmless because it only has to pass one for the tool to record it.

What does InpMinGapATRFrac 0.20 reject?

Any gap under a fifth of the current range reading. That floor scales with the market, so the same setting works on gold and on a quiet cross without needing a per-symbol point value.

Why does InpAlertOnNew ship switched off?

Because gaps appear regularly on a fast chart and most traders would rather look than be told. Switching it on gives one message per bar, which is manageable on H1 and noisy below it.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Fair Value Gap Sessions Indicator as one input. Always backtest before trading live.

Category: this is part of our Sessions collection. Next, plainly, truly, browse more Sessions 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