Forex Cipher Launch OfferSave up to 35% on your first signal membership payment.--d--h--m--s
All indicators

SMC Structure Flow

Read confirmed market structure with BOS and CHoCH levels, order blocks, equal highs and lows, and optional fair value gaps.

XAUUSDLoading SMC chart…
New York time
#MarketStructure#OrderBlocks#OpenSource

Explore Cipher S&I

Premium chart tools for signals, market context and configurable alerts.

Forex Cipher · Indicator documentation

SMC Structure Flow

A reference for the current Pine v6 build: structure, liquidity areas, settings and alert behaviour.

About the indicator

Two independent pivot layers follow internal and swing structure. The overlay combines BOS and CHoCH levels with optional order blocks, equal highs and lows, fair value gaps and previous-period references. The dashboard summarises the current state. This build contains no volume-profile module.

Structure and confirmation

A close beyond an unused confirmed pivot creates a structure event on a closed bar. A break against the previous direction is CHoCH; other breaks are labelled BOS. Internal pivots default to 5 confirmation bars and swing pivots to 50. A pivot is known after those bars, even when its label is drawn at the earlier pivot location.

Each layer has its own event selection and label size. Nearby internal and swing events can produce separate labels. Disable either layer to focus on the other. The optional internal directional body filter requires a bullish body for upward breaks and a bearish body for downward breaks.

Order blocks and liquidity

Order-block candidates come from eligible opposing candles within the configured search range. Range filtering uses ATR or mean candle range. Wick or Close determines invalidation; retention limits keep the chart manageable. Internal blocks default on and swing blocks off, with five retained per layer.

Equal highs and lows use confirmed pivots and an ATR tolerance, defaulting to 3 bars and 0.1 ATR. These are potential liquidity references, not proof of resting orders. Strong and weak levels describe structural direction.

Gaps and reference levels

Optional fair value gaps use completed source-timeframe values. Choose the chart timeframe or a higher timeframe; lower timeframes are not supported. Small-gap filtering defaults to 0.15 ATR, gap transparency to 70 and retained gaps to 30.

Previous day, week and month high/low references are optional. Premium, equilibrium and discount areas provide range context; they do not establish fair value or guarantee reversal.

All settings

These labels, defaults, limits and options are extracted from the current downloadable script.

Group / settingDefaultOptions / limits
Appearance
Structure history
HistoryHistory, Latest
Appearance
Palette
ColorColor, Monochrome
Appearance
Bullish
#38B99Acolor
Appearance
Bearish
#ED7885color
Appearance
Reference levels
#729CEFcolor
Appearance
Regime candle colors
falsebool
Internal structure
Internal structure
truebool
Internal structure
Pivot confirmation bars
52 – 50
Internal structure
Bullish events
AllAll, BOS, CHoCH
Internal structure
Bearish events
AllAll, BOS, CHoCH
Internal structure
Directional body filter
falsebool
Internal structure
Label size
TinyTiny, Small, Normal
Swing structure
Swing structure
truebool
Swing structure
Pivot confirmation bars
505 – 200
Swing structure
Bullish events
AllAll, BOS, CHoCH
Swing structure
Bearish events
AllAll, BOS, CHoCH
Swing structure
Label size
SmallTiny, Small, Normal
Swing structure
HH / LH / HL / LL labels
falsebool
Swing structure
Strong / weak levels
truebool
Appearance
Events retained per layer
905 – 150
Order blocks
Internal order blocks
truebool
Order blocks
Retain
51 – 20
Order blocks
Swing order blocks
falsebool
Order blocks
Retain
51 – 20
Order blocks
Maximum candidate search
1205 – 500
Order blocks
Range filter
ATRATR, Mean candle range
Order blocks
Maximum candle range multiple
2.00.5
Order blocks
Invalidate using
WickWick, Close
Order blocks
Fill transparency
800 – 100
Order blocks
Internal bullish
#729CEFcolor
Order blocks
Internal bearish
#ED8993color
Order blocks
Swing bullish
#567ED5color
Order blocks
Swing bearish
#C76776color
Liquidity levels
Equal highs / lows
truebool
Liquidity levels
Pivot confirmation bars
31 – 50
Liquidity levels
Tolerance in ATR
0.10 – 1
Fair value gaps
Fair value gaps
falsebool
Fair value gaps
Timeframe
timeframe
Fair value gaps
Filter small gaps
truebool
Fair value gaps
Minimum gap in ATR
0.150
Fair value gaps
Extend in source bars
10 – 50
Fair value gaps
Gaps retained
301 – 50
Fair value gaps
Fill transparency
700 – 100
Fair value gaps
Bullish gap
#52C6A8color
Fair value gaps
Bearish gap
#F08C98color
Period levels
Previous day high / low
falsebool
Period levels
Previous week high / low
falsebool
Period levels
Previous month high / low
falsebool
Period levels
Line style
DashedSolid, Dashed, Dotted
Value areas
Premium / equilibrium / discount
falsebool
Value areas
Fill transparency
850 – 100
Dashboard
Dashboard
truebool
Dashboard
Position
Top RightTop Right, Top Left, Bottom Right, Bottom Left

Installation and alerts

  1. Open Source code and copy the full script, or download the Pine file.
  2. In TradingView Pine Editor, paste the code into a new indicator, Save and Add to chart.
  3. Review the settings for your symbol and timeframe. Remove old instances if saved colours override new defaults.
  4. Create the desired alert condition and choose Once Per Bar Close.

The script exposes 16 conditions: internal and swing bullish/bearish BOS and CHoCH, four block-invalidation events, equal highs/lows and bullish/bearish gaps. The Vela preview calculates the default internal/swing structure, equal levels and internal order blocks through a native renderer. It is not a Pine runtime; optional Pine modules and alert execution remain available in TradingView. Full TradingView compilation remains unverified.

Reading the chart responsibly

Confirmation adds delay. Historical labels at a pivot origin must not be interpreted as signals available on that earlier candle. Feed, symbol, timeframe, settings and loaded history can change results. Drawings are subject to retention and platform limits.

Structure events and zones provide context, not guaranteed entries or returns. Test on your chosen market before relying on alerts. The downloadable current build includes its MIT licence; retain its notice when redistributing it.

Questions, answered.

BOS and CHoCH use closes beyond unused confirmed pivots. Pivot labels appear at their origin only after right-side confirmation.