Alan Ross

Alan Ross Forex

Free Forex Indicators, MetaTrader Tools and Honest Trading Guides

Learn Forex

Fair Value Gap Settings for MT5: How to Mark FVGs, and 0 of 32 Retest Settings Made Money on EURUSD While Gold M15 Made Money on 15 of 15

Key takeaways

  • MetaTrader 5 has no built-in fair value gap tool. You mark FVGs with a free indicator from the MQL5 Code Base or by eye with three candles. This guide covers both and the three settings that matter: minimum size, how long to wait for a retest, and a trend filter.
  • I ran 16 retest settings on each of four charts, EURUSD and gold, M5 and M15: 64 runs on 16,926 EURUSD bars and 13,736 gold bars.
  • EURUSD: 0 of 32 settings made money after a 1 pip spread. Gold M5: 1 of 16, and only in the second half.
  • Gold M15: 15 of 15 settings with enough trades made money, 9 of them in both halves. The best one, 0.5 ATR minimum, 48-bar wait and the EMA 200 side, was the best in both halves.
  • Even that setting stayed under what random entries reached on gold M15, so I would treat it as a lead to re-test, not a system.

Fair value gap indicators are among the most downloaded “smart money” tools for MT5. They all do the same basic job: find three candles where the first and third wick do not overlap, and draw a box over the gap. The differences are in the settings, and the settings decide whether you see 79 boxes a day or three.

What the gaps did on these charts, and why “they always fill” is weaker than it sounds, is in fair value gaps tested. This page is the practical part.

How do I mark a fair value gap in MT5?

MetaTrader 5 on a laptop, with boxes marking fair value gaps
  • By eye. Find a large candle. If the low of the candle after it is above the high of the candle before it, the space between is a bullish gap. Draw it with Insert, Shapes, Rectangle from the high of candle 1 to the low of candle 3. For a bearish gap, from the low of candle 1 down to the high of candle 3.
  • A free indicator. Search the MQL5 Code Base or the Market’s free section for “fair value gap” or “imbalance”. Install it as in how to add indicators to MT5. How free Code Base tools compared with the built-ins in general is in MQL5 Code Base indicators in MT5.
  • Check the box against the rule. Open any indicator on a chart and compare five boxes with the three-candle rule above. Some tools use the candle bodies instead of the wicks, which gives more and smaller gaps.

A gap is only known when candle 3 closes. If an indicator draws the box while candle 3 is still open, the box can appear and vanish. The ten-minute check in how to check if an MT5 indicator repaints catches that.

Which settings matter?

A trader choosing a minimum gap size for an FVG indicator
SettingWhat it doesValues tested
Minimum gap sizeHides gaps smaller than a share of ATR(14), or a fixed number of points0, 0.25, 0.5 and 1 ATR
Retest windowHow many bars a gap stays valid for an entry12 and 48 bars
Trend filterOnly take retests on the side of a long averageNone, or close above or below EMA 200
MitigationRemoves the box once price has traded into itBox used once, on the first touch

The entry in every run: the first bar that touches the gap and does not close through its far edge, traded in the direction of the gap. Stop 1.5 ATR, target 3 ATR, 48 bars at most, one trade at a time. Cost 1 pip on EURUSD, $0.30 an ounce on gold.

How many gaps will I see with each minimum size?

Gaps a trading dayEURUSD M5EURUSD M15Gold M5Gold M15
Any size79225818
0.25 ATR or more7921319
0.5 ATR or more6911154
1 ATR or more283.63.21.1
Median gap at 1 ATR or more2.7 pips6.5 pips$7.10$14.00

EURUSD M5 is the odd one. Its bars are so small, a median ATR of 2 pips, that most gaps are already bigger than half an ATR, and even the 1 ATR filter left 28 a day. On gold and on any M15 chart, 0.5 ATR cuts the boxes to a number you can follow.

Which retest settings made money?

16 settings per chartEURUSD M5EURUSD M15Gold M5Gold M15
Settings with 30+ trades16161615
Made money after cost00115
Made money in both halves0009
Best setting, per trade-1.01-0.75+0.11+3.18
Worst setting, per trade-1.28-2.06-1.72+0.80

Pips on EURUSD, dollars an ounce on gold.

On EURUSD no setting came close. Every one of the 32 lost between 0.75 and 2.06 pips a trade, and no minimum size or filter turned a single one positive. On gold M5 one setting out of 16 made $0.11 an ounce, and lost in the first half.

What did the gold M15 settings look like?

Gold M15 retestTradesPer tradeFirst halfSecond half
Any size, 48 bars, no filter217+$1.12+$1.05+$1.15
Any size, 48 bars, EMA 200182+$1.86+$2.13+$1.75
0.25 ATR, 48 bars, EMA 200145+$2.51+$0.96+$3.16
0.5 ATR, 12 bars, no filter111+$1.74+$0.10+$2.43
0.5 ATR, 48 bars, no filter125+$2.71+$2.27+$2.90
0.5 ATR, 48 bars, EMA 20096+$3.05+$2.65+$3.22
1 ATR, 48 bars, EMA 20036+$3.18+$6.13+$2.04
1 ATR, 12 bars, no filter34+$0.80+$4.17-$0.81

Two patterns repeat. The 48-bar window beat the 12-bar one in all 8 pairs, and the EMA 200 filter helped in 6 of 8. The forward check also held: among the 12 settings with at least 15 trades in each half, the one with the best first half, 0.5 ATR, 48 bars, EMA 200, was also the best in the second half.

Now the cold water. Random entries on gold M15 with the same exit made up to +$3.87 a trade at the 95th percentile for a run of 96 trades. Gold M15 has few trades and wide swings, so a +$3.05 result sits inside luck. It also held on only one of four charts. The same retest lost on gold M5, built from the same price.

What settings would I use?

  • Minimum size 0.5 ATR, or 1 ATR on EURUSD M5. Below that the boxes are noise and cover the chart.
  • A 48-bar retest window rather than 12, if you trade retests at all.
  • EMA 200 side as a filter on gold. It did not help on EURUSD.
  • Treat the gold M15 result as a hypothesis. Run it forward on a demo before money, the way backtest vs demo describes.

The retest against the opposite bet, trading the fill, is in fair value gap retest vs fill. Other free MQL5 tools tested the same way are in free MQL5 indicators tested.

Frequently asked questions

Does MT5 have a fair value gap indicator?

Not built in. Free versions are on the MQL5 Code Base and Market, or you can draw the gaps with the Rectangle tool.

What is the best minimum size for FVGs?

0.5 ATR on gold and on M15 charts, 1 ATR on EURUSD M5. Smaller gaps appear dozens of times a day.

How long does a fair value gap stay valid?

In this test a 48-bar retest window beat a 12-bar one in all 8 gold M15 pairs. On EURUSD neither made money.

Do fair value gap indicators repaint?

A correct one should not: the gap is known when the third candle closes. One that draws the box on an open candle can repaint.

Which market worked best for FVG retests?

Gold M15: 15 of 15 settings made money, 9 in both halves. EURUSD: 0 of 32.

Want an MT5 tool that does not redraw itself?

It is my own enhanced DeMARK Trend Line indicator for MetaTrader 4 and 5. Non repaint, clean, and free.

Download the Free DeMARK Indicator

Written by Alan Ross

Forex trader and MetaTrader indicator developer. I build and test MT4 and MT5 tools, then write the honest version of how they actually work. More about me.

Last reviewed October 2026
Alan Ross
Alan Ross

Forex educator and indicator developer. I build and trade my own MetaTrader tools, and share the ones that genuinely help.

Leave a comment

Your email address will not be published. Comments are reviewed before they appear.