Loading…

Fair Value Gap Finder

A fair value gap forms across three consecutive candles when the first and third never overlap: the whole of the middle candle's range sits in a strip of price the market jumped over rather than traded through. Because no orders were filled in that strip, traders watch it as a magnet - a place price often returns to before continuing - and as a candidate entry zone when it does. The gap cannot exist, by definition, until the third candle of the triple has closed - there is no way to know the market skipped a range until the candle that would have filled it has finished forming. This indicator only ever marks a gap once that third candle is a confirmed, closed bar. It does not draw anything on the strength of the still-forming bar on the right of the chart. Filling is treated the same way. A zone is only marked filled once a confirmed bar's wick has traded completely through it; testing the still-forming bar would make the fill state flicker back and forth as price moves inside it during the bar, which is its own form of repainting. Once filled, a zone either fades to a neutral colour as a historical reference or disappears outright, depending on preference. Until filled, an active zone's right edge is kept pinned to the current time purely for drawing - that visual stretch is not a signal of any kind. Notes and limitations - A gap only appears after its third candle has closed - this marks a completed imbalance for reference, it is not an early warning that one is forming. - The fill test uses wick extremes (high/low), not the close, so a zone can be marked filled by a single spike even if price closes back outside it. - Carries one calculation-only buffer flagging the bar a new gap formed on; it is not plotted and exists only so the file has a well-formed buffer. - Zone objects are named from the anchor candle's bar time, so reloading history or recompiling never produces duplicate rectangles for the same gap. - Very small gaps on a quiet instrument can be visually cluttered; there is no minimum-size filter in this version.

Indicator · MT5 · v1.0 · Free

About Fair Value Gap Finder

Fair Value Gap Finder is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 6 settings, such as Alerts, Fade on fill and Bull color. MQL source code included.

Files in the download: FairValueGaps.ex5, FairValueGaps.mq5, FairValueGaps.txt.

Settings

SettingDefaultWhat it does
AlertstrueAlert on a new gap (closed bar only)
Fade on filltrueFade filled zones instead of deleting them
Bull colorclrDodgerBlueBullish gap zone colour
Bear colorclrTomatoBearish gap zone colour
Faded colorclrSilverColour a zone turns once filled (fade mode)
Fill solidtrueDraw zones as solid rectangles

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Smart Money (SMC / ICT) · Alerts · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria