Fair Value Gap Trader
- Experts
- Version: 1.0
- Activations: 5
Fair Value Gap Trader trades one setup: the return of price into an unfilled Fair Value Gap.
A Fair Value Gap is a three-candle imbalance — a price range the market crossed so fast that orders were left unfilled. Price often comes back to that range before continuing.
How it works
- Finds an imbalance on the timeframe you choose, and ignores gaps too small to matter.
- Waits for price to return into that range.
- Opens the trade with a stop loss and a take profit already attached.
- Optional confirmation filters (break of structure, retracement depth, order block) can each be switched on.
- If price does not return in time, the zone is discarded and no trade is taken.
Risk control
- Every position has a stop loss from the moment it opens.
- Take profit is a multiple of the risk taken, not a fixed number of points.
- Lot size can be fixed, or a percentage of your balance.
- Daily loss limit, equity protection stop, and a spread filter.
- No grid. No martingale. It never adds to a losing position.
Recommended setup
- Symbols: XAUUSD (gold) and EURUSD
- Timeframes: M5, M15, H1 and H4
- Account: hedging, with a low spread (ECN / Raw)
- Leverage: 1:100 or higher
- Minimum deposit: 500 USD; 1000 USD or more is better
- A VPS is recommended.
What to expect
The EA is selective. On some days it does not trade at all. Losing trades are normal and they come in runs. The system is built so that each single loss stays small and controlled.
Choose a low-spread broker.
Honest note
The published results come from the Strategy Tester, not from a live account. Test it on a demo account with your own broker first, then start with a small risk setting.
Support
Questions, settings and set files: message me through my MQL5 profile.
Parameters
Structure
- Timeframe the imbalance is read from — the higher timeframe used to find the gap.
- ATR period — the volatility measure used to judge gap size and stop distance.
Fair Value Gap
- Minimum gap size — gaps smaller than this multiple of ATR are ignored as noise.
- Retest window — how many bars the zone stays valid before it expires.
- Trade bullish gaps — allow long entries.
- Trade bearish gaps — allow short entries.
- Maximum zones tracked — how many unfilled gaps are followed at the same time.
Risk per trade
- Stop buffer — how far beyond the far edge of the gap the stop is placed, in ATR.
- Target — the take profit, as a multiple of the risk taken on that trade.
- Minimum stop distance — a floor on risk, so a very thin gap cannot create an unreasonable stop.
Partial close and stop into profit
- Use partial close — close part of the position once it reaches a set profit.
- Partial trigger — the profit level, in multiples of risk, that triggers it.
- Partial size — the percentage of the position to close.
- Move stop into profit — after the partial, move the stop beyond the entry price.
- Amount secured — how much of the risk to lock in when doing so.
- Use trailing stop — trail the remaining volume by ATR.
- Trail distance — the trailing distance, in ATR.
Confirmation filters
- Require break of structure — accept a gap only after price has broken the prior swing.
- Swing size — how many bars define a swing for that test.
- Require deep retracement — accept a gap only after a deep pullback.
- Minimum retracement — how deep that pullback must be.
- Require order block — accept a gap only where it overlaps the last opposing candle.
Position size
- Size from percentage of balance — on: risk a percentage; off: use a fixed lot.
- Risk per trade — the percentage of balance risked on one trade.
- Fixed lot — the lot used when percentage sizing is off.
- Maximum lot — a ceiling on the calculated lot size.
Protection
- Daily loss limit — stop trading for the rest of the day past this percentage loss.
- Equity protection stop — stop trading altogether once equity falls this percentage from its peak.
- Maximum open positions — how many positions may be open at the same time.
- Spread limit — skip entries while the spread is above this, in points.
Execution
- Maximum slippage — allowed price deviation, in points.
- Magic number — the identifier for this EA's own orders.
- Order comment — the text attached to each order.
- Show information panel — display the status panel on the chart.
