Strategy · Pine Script v5 · On the chart

IFVG Strategy – MNQ 5min

by leehskii

This overlay strategy is built for MNQ on a five-minute chart and is meant to trade imbalance fair value gaps.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code275
Settings11inputs
LicenceNone stated
Last update5 months ago28 May 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

IFVG Strategy – MNQ 5min reads one-hour and two-hour closes against exponential moving averages for directional bias, and it flags liquidity sweeps of the previous day high or low and the session open. Settings control minimum gap sizes, the maximum sweep-to-gap distance, swing lookback, a New York session window, dollar risk limits, a stop buffer, and a risk-reward target. Higher-timeframe data is requested with lookahead off, and orders are processed on bar close.

Details

Published by

leehskii on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

SMC / ICT / price action, Support & resistance, Sessions & time, Moving averages

Markets

Indices

Timeframes

M1-M5

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
HTF EMA period (1H & 2H)int20i_htf_ema
Min 5m FVG size (pts)float3.0i_fvg_min
Min HTF FVG size (pts)float10.0i_htf_fvg_min
Max sweep-to-FVG gap (pts)float20.0i_sweep_gap
Swing lookback (bars)int10i_swing_lb
Risk per trade ($)float100.0i_risk
Max allowed risk per trade ($)float130.0i_max_risk
Stop buffer beyond swing (pts)float10.0i_stop_buf
$ per point (MNQ=2, NQ=20)float2.0i_mnq_pt
Risk:Reward targetfloat2.0i_rr
Trade session (ET)session0930-1600i_session
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

P404 Smoke

by Musyimi97
16 stars

P404 Smoke is a price-chart strategy that sequences an optional higher-timeframe EMA bias, a liquidity range from recent pivots, a sweep of buy-side or sell-side liquidity, and a market structure shift within a set bar window. Comments state it then looks for

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · MIT GitHub repository of P404 Smoke

Try Trading Future

by dearvn
257 stars

This futures trading strategy combines Fair Value Gap (FVG) detection filtered by Average True Range (ATR) with multi-timeframe Exponential Moving Averages (8, 55, and 165 lengths). It identifies entry setups during a defined intraday trading session window wh

Strategy v5 SMC / ICT / price actionMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Try Trading Future

Daily Bias + FVG Strategy

by TradersPost
218 stars

This overlay strategy plots previous-day high and low, the daily open, and fair value gap zones on the price chart. It takes entries on a selectable timeframe when the FVG requirement and an optional session window allow them, then uses an ATR or fixed pip sto

Strategy v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Daily Bias + FVG Strategy

FairValueGap D003

by ruckard
13 stars

This strategy measures the distance between the current price and the opposite end of the latest fair value gap, entering trades on the expectation that price will fill the gap. It plots signals and execution levels directly on the price chart. Users can confi

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of FairValueGap D003

XXX

by MeridianAlgo
9 stars

This multi-timeframe scalping strategy plots moving averages alongside Smart Money Concepts elements on the price chart. It calculates trend signals using configurable moving average types like ALMA, Hull MA, or TEMA across alternate timeframes. It also plots

Strategy v5 TrendMoving averages Repaints
Updated 4 months ago · MIT GitHub repository of XXX
7 stars

This overlay strategy tracks the high and low of a user-defined London session and plots the previous session levels as support and resistance. It flags a break beyond a level when price closes past an ATR buffer, then waits a set number of bars for a retest w

Strategy v5 Sessions & timeSupport & resistance
Updated 3 months ago · None stated GitHub repository of London SR Cleaner WR (TP 0.20)

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers