Indicator · Pine Script v6 · Own pane

SMC Orderflow Overlay

by skipp-dev· code credited to preuss_steffen

SMC Orderflow Overlay is a separate-pane order flow indicator designed to complement Smart Money Concepts strategies.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code129
Settings11inputs
LicenceNone statedfile: MPL-2.0
Last update4 days ago26 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  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 indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

129 lines of Pine Script v6 from SMC_Orderflow_Overlay.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

SMC_Orderflow_Overlay.pine
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © preuss_steffen

//@version=6

// Product role: companion_operator_only. Pro-only orderflow overlay outside the Lite default surface.

// ─────────────────────────────────────────────────────────────────
// SMC Orderflow Overlay — lightweight companion to SMC Core
//
// Visualizes flow qualifier fields from the v5.1 enrichment layer:
//   • Relative volume / activity / size bars
//   • Delta proxy indicator
//   • ATS state + spike markers
//   • Flow direction confirmation (long ok / short ok)
//
// Reads mp.* fields from the generated micro-profiles library.
// Keep on a separate pane — independent of trade signals.
// ─────────────────────────────────────────────────────────────────

indicator("SMC Orderflow Overlay", overlay = false, max_labels_count = 50)

import preuss_steffen/smc_micro_profiles_generated/569 as mp

// ── Inputs ──────────────────────────────────────────────────────

var g_fl = "Orderflow Overlay"
var bool show_rel_vol        = input.bool(true,  "Show relative volume bar",   group = g_fl)
var bool show_delta_proxy    = input.bool(true,  "Show delta proxy",           group = g_fl)
var bool show_ats_state      = input.bool(true,  "Show ATS state",             group = g_fl)
var bool show_flow_direction = input.bool(true,  "Show flow direction markers", group = g_fl)
var color col_bullish        = input.color(color.new(color.green, 30), "Bullish color",  group = g_fl)
var color col_bearish        = input.color(color.new(color.red, 30),   "Bearish color",  group = g_fl)
var color col_neutral        = input.color(color.new(color.gray, 50),  "Neutral color",  group = g_fl)

var g_fp = "Real Footprint (opt-in)"
var bool use_real_footprint = input.bool(false, "Use real footprint delta", group = g_fp, tooltip = "Jan-2026 request.footprint(): real buy/sell volume and delta from TradingView's footprint engine. OPT-IN because footprint data depends on your TradingView plan and symbol; without it the value stays na and this overlay behaves exactly as before. The delta proxy plot stays on — run both side by side to judge the proxy before trusting either.")
var int fp_ticks_per_row  = input.int(25,  "Ticks per row", minval = 1, group = g_fp, active = use_real_footprint)
var int fp_value_area_pct = input.int(70,  "Value area %",  minval = 1, maxval = 100, group = g_fp, active = use_real_footprint)
var int fp_imbalance_pct  = input.int(300, "Imbalance %",   minval = 1, group = g_fp, active = use_real_footprint)

// ── Library fields ──────────────────────────────────────────────

float  fl_rel_vol         = mp.REL_VOL
float  fl_rel_activity    = mp.REL_ACTIVITY
float  fl_delta_proxy_pct = mp.DELTA_PROXY_PCT
bool   fl_flow_long_ok    = mp.FLOW_LONG_OK
bool   fl_flow_short_ok   = mp.FLOW_SHORT_OK
string fl_ats_state       = mp.ATS_STATE
bool   fl_ats_spike_up    = mp.ATS_SPIKE_UP
bool   fl_ats_spike_down  = mp.ATS_SPIKE_DOWN

// Library freshness check (shared pattern across all companions)
var label stale_badge = na
if barstate.islast
    float asof_year  = str.tonumber(str.substring(mp.ASOF_DATE, 0, 4))
    float asof_month = str.tonumber(str.substring(mp.ASOF_DATE, 5, 7))
    float asof_day   = str.tonumber(str.substring(mp.ASOF_DATE, 8, 10))
    int asof_ts      = timestamp(int(asof_year), int(asof_month), int(asof_day))
    int days_old     = math.floor((timenow - asof_ts) / 86400000)
    if days_old > 2
        if not na(stale_badge)
            label.delete(stale_badge)
        stale_badge := label.new(bar_index, low,
            "⚠ Library " + str.tostring(days_old) + "d old",
            color = color.new(color.red, 40), textcolor = color.white,
            style = label.style_label_up, size = size.tiny)

// ── Relative volume plot ────────────────────────────────────────

color rv_color = fl_rel_vol >= 1.5 ? col_bullish : fl_rel_vol <= 0.5 ? col_bearish : col_neutral
plot(show_rel_vol ? fl_rel_vol : na, "RelVol", rv_color, 2, plot.style_columns)
hline(1.0, "RelVol Baseline", color.new(color.gray, 70), hline.style_dotted)

// ── Delta proxy ─────────────────────────────────────────────────

color dp_color = fl_delta_proxy_pct > 0 ? col_bullish : fl_delta_proxy_pct < 0 ? col_bearish : col_neutral
plot(show_delta_proxy ? fl_delta_proxy_pct : na, "Delta Proxy %", dp_color, 1, plot.style_histogram, display = display.pane)

// ── Real footprint delta (opt-in, Jan-2026 request.footprint) ───
// Same unit as the proxy: PERCENT of bar volume (DELTA_PROXY_PCT is percent —
// the status line prints it with '%'), hence the explicit ×100 on the raw
// delta/total fraction. na-guarded end to end: charts or plans without
// footprint data leave the line empty and the proxy untouched.
footprint fl_fp = use_real_footprint ? request.footprint(fp_ticks_per_row, fp_value_area_pct, fp_imbalance_pct) : na
float fl_fp_total     = na(fl_fp) ? na : footprint.total_volume(fl_fp)
float fl_fp_delta_pct = na(fl_fp) or not (fl_fp_total > 0) ? na : 100 * footprint.delta(fl_fp) / fl_fp_total
color dr_color = fl_fp_delta_pct > 0 ? col_bullish : fl_fp_delta_pct < 0 ? col_bearish : col_neutral
plot(use_real_footprint ? fl_fp_delta_pct : na, "Delta Real %", dr_color, 2, plot.style_line, display = display.pane)

// ── ATS state background ────────────────────────────────────────

color ats_bg = show_ats_state ?
     fl_ats_state == "ACCUMULATION" ? color.new(color.green, 90) :
     fl_ats_state == "DISTRIBUTION" ? color.new(color.red, 90)   :
     fl_ats_state == "TRANSITION"   ? color.new(color.yellow, 90) :
     na :
     na
bgcolor(ats_bg, title = "ATS State")

// ── ATS spike markers ──────────────────────────────────────────

plotshape(show_ats_state and fl_ats_spike_up,  "ATS Spike Up",   shape.triangleup,   location.bottom, col_bullish, size = size.tiny)
plotshape(show_ats_state and fl_ats_spike_down, "ATS Spike Down", shape.triangledown, location.top,    col_bearish, size = size.tiny)

// ── Flow direction markers ──────────────────────────────────────

plotchar(show_flow_direction and fl_flow_long_ok  ? 0 : na, "Flow Long OK",  "▲", location.bottom, col_bullish, size = size.tiny, display = display.all)
plotchar(show_flow_direction and fl_flow_short_ok ? 0 : na, "Flow Short OK", "▼", location.top,    col_bearish, size = size.tiny, display = display.all)

// ── Status line ─────────────────────────────────────────────────

string flow_summary = "RV:" + str.tostring(fl_rel_vol, "#.##") + " Δ:" + str.tostring(fl_delta_proxy_pct, "#.#") + "% ATS:" + fl_ats_state + (use_real_footprint and not na(fl_fp_delta_pct) ? " Δreal:" + str.tostring(fl_fp_delta_pct, "#.#") + "%" : "")

// Flow summary via label (plotchar char= only supports single characters)
var label flow_label = na
if barstate.islast
    if not na(flow_label)
        label.delete(flow_label)
    flow_label := label.new(bar_index, low,
        flow_summary,
        color = color.new(color.gray, 80), textcolor = color.white,
        style = label.style_label_up, size = size.tiny)

// Keep a simple plotchar for the status line (single char indicator)
plotchar(fl_flow_long_ok ? 1 : fl_flow_short_ok ? -1 : 0,
    "Flow Direction", "•", location.absolute,
    fl_flow_long_ok ? col_bullish : fl_flow_short_ok ? col_bearish : color.gray,
    size = size.tiny, display = display.status_line)

Overview

SMC Orderflow Overlay plots relative volume, delta proxy values, ATS state and spike indicators, and flow direction confirmation markers. Traders can enable an opt-in footprint engine mode to calculate real buy and sell volume delta, value area percentages, and imbalances directly. Settings allow users to customize colors, toggle flow components, and adjust footprint ticks or imbalance thresholds.

Details

Published by

skipp-dev on GitHub

Code credit

preuss_steffen, as written in the script's header

Draws

Separate pane below the chart

Markets

Any symbol

Timeframes

Any timeframe

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
Show relative volume barbooltrueshow_rel_vol
Show delta proxybooltrueshow_delta_proxy
Show ATS statebooltrueshow_ats_state
Show flow direction markersbooltrueshow_flow_direction
Bullish colorcolorcolor.new(color.green, 30)col_bullish
Bearish colorcolorcolor.new(color.red, 30)col_bearish
Neutral colorcolorcolor.new(color.gray, 50)col_neutral
Use real footprint deltaboolfalseuse_real_footprint
Ticks per rowint25fp_ticks_per_row
Value area %int70fp_value_area_pct
Imbalance %int300fp_imbalance_pct
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

Nexural Transform

by JasonTeixeira
9 stars

Nexural Transform is an oscillator indicator calculated in a separate pane that combines Fisher Transform mechanics with Cumulative Volume Delta momentum. It integrates volume-weighted price transforms, CVD acceleration, and order flow features like absorption

Indicator v6 Oscillators & momentumVolume
Updated 2 weeks ago · Custom licence GitHub repository of Nexural Transform
9 stars

The script calculates a two-layer reversal scoring system designed to identify potential market turning points. Layer A evaluates momentum, overextension, volume, and candle metrics to establish a setup score, while Layer B confirms structural events such as m

Indicator v6 Oscillators & momentumSMC / ICT / price action
Updated 3 days ago · MIT GitHub repository of Vein: Reversal Score 4H
2 stars

The Liquidity Void Detector calculates a custom oscillator to identify low-participation price moves in a separate pane. It computes a log volume shock z-score against a moving average baseline and a 1-bar log return z-score. When volume drops below the low-vo

Indicator v6 SMC / ICT / price actionVolume
Updated 8 months ago · None stated GitHub repository of Liquidity Void Detector (Zeiierman)

Adaptive Market Suite

by jayadevrana
1 stars

This indicator bundles four switchable modules, each with its own settings. The first is an adaptive moving average that speeds up in clean trends and shows a trending or ranging read. The second draws volatility bands whose width follows the ATR percentile. T

Indicator v6 TrendVolatility & bands
Updated 2 months ago · Custom licence GitHub repository of Adaptive Market Suite
1 stars

This indicator calculates volume anomaly metrics using rolling z-scores of window volume, trend cleanliness from directional price consistency, and relative price impact. It plots these in a separate pane alongside signals: yellow dots for volume building with

Indicator v6 VolumeVolatility & bands
Updated 7 months ago · None stated GitHub repository of Volume Flow Anomaly AnomIQ Preview

More SMC / ICT scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

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

Compare brokers