Smart Money Concepts (SMC) Guide

Master this indicator with Pine Script code and automated strategies.

What is Smart Money Concepts (SMC)?

Smart Money Concepts is a price-action framework that reads charts as the footprint of institutional order flow. Its core vocabulary: Break of Structure (BOS) - price takes out a swing high/low in the direction of the trend, confirming continuation; Change of Character (CHoCH) - the first structure break against the trend, an early reversal warning; Order Blocks - the last opposing candle before an impulsive move (see our Order Block guide at /apps/tradingview-indicators/order-blocks/); Fair Value Gaps - 3-candle imbalances that price returns to fill (see /apps/tradingview-indicators/fair-value-gaps/); and Liquidity - pools of stop orders above equal highs and below equal lows that "smart money" sweeps before reversing. LuxAlgo's free Smart Money Concepts script implements all of these and is the most-liked indicator on all of TradingView.

How to Use This Strategy

Pro Tip: Use structure as your bias filter: a string of bullish BOS prints means you only look for longs. A CHoCH is your warning shot - do not reverse immediately, but start watching for a retrace into the order block or fair value gap that produced the CHoCH. The classic SMC sequence is: liquidity sweep (price wicks below equal lows), CHoCH to the upside, then a pullback into the FVG/order block left by that CHoCH leg - that pullback is the entry. Trade the framework on 1-hour and 4-hour structure and execute on 5-15 minute charts; on very low timeframes every tick looks like a "break of structure."

Pine Script Code

Copy and paste this code into your TradingView Pine Editor.

PINE SCRIPT V5
//@version=5
indicator("SMC Structure: BOS / CHoCH", overlay=true)

// Inputs
pivotLen = input.int(5, "Pivot Length")

// Swing structure
ph = ta.pivothigh(high, pivotLen, pivotLen)
pl = ta.pivotlow(low, pivotLen, pivotLen)

var float lastHigh = na
var float lastLow = na
var int trend = 0  // 1 = bullish structure, -1 = bearish structure

if not na(ph)
    lastHigh := ph
if not na(pl)
    lastLow := pl

// Structure breaks
breakUp = not na(lastHigh) and ta.crossover(close, lastHigh)
breakDown = not na(lastLow) and ta.crossunder(close, lastLow)

// CHoCH = first break AGAINST the prevailing trend; BOS = break WITH it
chochUp = breakUp and trend == -1
chochDown = breakDown and trend == 1
bosUp = breakUp and trend != -1
bosDown = breakDown and trend != 1

if breakUp
    trend := 1
if breakDown
    trend := -1

// Labels
plotshape(bosUp, "BOS Up", shape.labelup, location.belowbar, color.new(color.green, 0), text="BOS", textcolor=color.white, size=size.tiny)
plotshape(bosDown, "BOS Down", shape.labeldown, location.abovebar, color.new(color.red, 0), text="BOS", textcolor=color.white, size=size.tiny)
plotshape(chochUp, "CHoCH Up", shape.labelup, location.belowbar, color.new(color.teal, 0), text="CHoCH", textcolor=color.white, size=size.small)
plotshape(chochDown, "CHoCH Down", shape.labeldown, location.abovebar, color.new(color.orange, 0), text="CHoCH", textcolor=color.white, size=size.small)