DEV Community

Orion
Orion

Posted on

3 Pine Script SMC indicators I built — grab the FVG Lite free (full code inside)

If you trade using Smart Money Concepts (SMC) — Fair Value Gaps, Order Blocks, Liquidity sweeps — you've probably felt the pain of either paying $40/month for an indicator subscription or spending hours writing Pine Script v5 from scratch.

I built a three-indicator suite and I'm putting the FVG Lite version here for free. Full working code below.


What these three indicators do

SMC FVG Pro — detects Fair Value Gaps (3-bar imbalances where price will likely return to fill). Tracks mitigation (gap fill), filters noise with a minimum gap-size setting, and alerts on bull/bear FVG + gap fill.

SMC Liquidity Zones — maps Buy-Side and Sell-Side Liquidity (equal highs/lows, range extremes). Marks sweep events when price pierces a zone and reverses — that's the institutional entry signal.

SMC Order Blocks MTF — marks bullish and bearish Order Blocks with multi-timeframe alignment. An OB that lines up on your chart AND the higher timeframe is high-probability.

Together they give you a full SMC workflow on a single chart.


The free version: SMC FVG Lite

Here's the complete Pine Script v5 code. Copy it directly into TradingView's Pine Editor:

// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0
// © OrionSuite 2026
//@version=5
indicator("SMC FVG Lite [Free] — Orion", overlay=true, max_boxes_count=100)

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
//  SMC FVG Lite — Fair Value Gap Detector (FREE public version)
//
//  ⭐ Get the FULL Orion SMC Suite (FVG Pro + Liquidity Zones + Order Blocks MTF):
//     → nexusai82.gumroad.com/l/pine-smc  ($29 one-time, instant download)
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

showBull = input.bool(true, "Show Bullish FVGs", group="Settings")
showBear = input.bool(true, "Show Bearish FVGs", group="Settings")
extBars  = input.int(30,   "Extend (bars)",      minval=5, maxval=100, group="Settings")
cBull    = input.color(color.new(#26a69a, 80), "Bullish Color", group="Settings")
cBear    = input.color(color.new(#ef5350, 80), "Bearish Color", group="Settings")

// 3-bar FVG detection
isBullFVG = low > high[2]    // gap up: current low above 2-bars-ago high
isBearFVG = high < low[2]    // gap down: current high below 2-bars-ago low

if isBullFVG and showBull
    box.new(bar_index[2], low, bar_index + extBars, high[2],
            bgcolor=cBull, border_color=color.new(#26a69a, 10), border_width=1)

if isBearFVG and showBear
    box.new(bar_index[2], low[2], bar_index + extBars, high,
            bgcolor=cBear, border_color=color.new(#ef5350, 10), border_width=1)

alertcondition(isBullFVG, "Bullish FVG", "🟢 Bullish FVG — {{ticker}} {{interval}} @ {{close}}")
alertcondition(isBearFVG, "Bearish FVG", "🔴 Bearish FVG — {{ticker}} {{interval}} @ {{close}}")

// Upgrade nudge in chart corner
var label cta = label.new(bar_index, high,
    "SMC FVG Lite (Free)\n⭐ Full Suite $29 → nexusai82.gumroad.com/l/pine-smc",
    color=color.new(#161b22, 90), textcolor=color.new(#58a6ff, 40),
    style=label.style_label_lower_right, size=size.small, textalign=text.align_right)
label.set_x(cta, bar_index)
label.set_y(cta, ta.highest(high, 20))
Enter fullscreen mode Exit fullscreen mode

Paste it in, click Add to chart. You'll see bullish FVGs shaded teal and bearish FVGs shaded red, extending forward so you can see which ones price hasn't yet returned to fill.


How FVG detection works (the 3-bar rule)

A Fair Value Gap is a 3-bar imbalance:

  • Bullish FVG: low[0] > high[2] — current candle's low is above the candle two bars ago's high. There's a gap price skipped over on the way up.
  • Bearish FVG: high[0] < low[2] — current candle's high is below two bars ago's low. Price fell through without trading in that range.

SMC theory: institutions leave these gaps intentionally. Price typically retraces to fill them before continuing the trend. That retest is your entry zone.

The Lite version draws the box and fires alerts. The Pro version adds mitigation tracking (detects when the gap is filled and marks it), a minimum gap size filter (removes the tiny noise gaps), and a max FVG limit (auto-cleans old boxes so your chart doesn't get cluttered).


What the full $29 suite adds

The full suite at nexusai82.gumroad.com/l/pine-smc includes:

SMC FVG Pro (upgrade from this Lite):

  • ✅ Mitigation tracking — gap fill detection + alert
  • ✅ Min gap size filter — removes noise
  • ✅ Max FVG limit — auto-cleanup
  • ✅ Live box extension to current bar

SMC Liquidity Zones (new indicator):

  • ✅ BSL/SSL detection (equal highs/lows)
  • ✅ Sweep detection with reversal alert
  • ✅ Zone strength rating

SMC Order Blocks MTF (new indicator):

  • ✅ OB detection on current timeframe
  • ✅ Higher-timeframe alignment overlay
  • ✅ Bullish/Bearish OB labels

Trading Guide PDF — setup walkthrough + 3 strategy examples combining all three indicators.

$29 one-time, instant ZIP download. No subscription.


If you use the Lite version and find it useful, the upgrade link is in the chart corner. Happy trading.

Top comments (0)