Indicator · Pine Script v6 · On the chart

SMC Setup Check

by skipp-dev· code credited to preuss_steffen

SMC Setup Check is a diagnostic utility indicator designed to verify chart-link bindings between the chart and the SMC Long-Dip Suite.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code104
Settings6inputs
LicenceNone statedfile: MPL-2.0
Last update2 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

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

SMC_Setup_Check.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

// ────────────────────────────────────────────────────────────────
// SMC Setup Check v1 — validates that the chart link to the Suite is wired correctly.
//
// Add this indicator AFTER adding SMC Long-Dip Suite to the chart.
// It reads the critical linked channels and reports connection status.
// Once everything is green, you can safely add Dashboard and Strategy.
// ────────────────────────────────────────────────────────────────

indicator("SMC Setup Check", overlay = true)

// ── Chart-link bindings (minimal critical set) ──
var string g_bus = "Chart Link - SMC Long-Dip Suite"

// Declared in the Suite's BUS plot() order. TradingView lists a source study's
// outputs in that plot order, so matching it here means each row's dropdown pick
// moves strictly downwards while binding — no scrolling back up.
src_schema   = input.source(close, "BUS SchemaVersion",  group = g_bus, display = display.none, tooltip = "Open indicator settings and bind each row to the matching hidden BUS output from SMC Long-Dip Suite.\n\nThe rows are listed in the same order as the Suite outputs in the dropdown, so you can bind them top to bottom:\nSchemaVersion → Armed → Trigger → Invalidation → QualityScore → StateCode.")
src_armed    = input.source(close, "BUS Armed",          group = g_bus, display = display.none)
src_trigger  = input.source(close, "BUS Trigger",        group = g_bus, display = display.none)
src_invalid  = input.source(close, "BUS Invalidation",   group = g_bus, display = display.none)
src_quality  = input.source(close, "BUS QualityScore",   group = g_bus, display = display.none)
src_state    = input.source(close, "BUS StateCode",      group = g_bus, display = display.none)

// ── Detection Logic ──
// BUS SchemaVersion is a constant (7001) emitted by SMC Long-Dip Suite on every bar.
// If we're still reading 'close', the source was never bound.
float EXPECTED_SCHEMA = 7001

bool schema_ok      = not na(src_schema) and src_schema == EXPECTED_SCHEMA
bool state_ok       = schema_ok and not na(src_state)
bool armed_ok       = schema_ok and not na(src_armed)
bool quality_ok     = schema_ok and not na(src_quality)
bool trigger_ok     = schema_ok  // trigger/invalidation are na when no zone is active — that's valid
bool invalidation_ok = schema_ok

bool all_ok = schema_ok and state_ok and armed_ok and quality_ok

// ── Render ──
var table check_tbl = table.new(position.middle_center, 2, 10, border_width = 0)

status_icon(bool ok) => ok ? "✅" : "❌"
status_bg(bool ok)   => ok ? color.new(color.teal, 80) : color.new(color.red, 75)

check_row(table tbl, int row, string label_text, string value_text, bool ok) =>
    table.cell(tbl, 0, row, label_text, bgcolor = status_bg(ok), text_color = chart.fg_color, text_halign = text.align_left,  text_size = size.normal)
    table.cell(tbl, 1, row, value_text, bgcolor = status_bg(ok), text_color = chart.fg_color, text_halign = text.align_right, text_size = size.normal)

if barstate.islast
    color txt = chart.fg_color
    color header_bg = color.new(color.black, 100)

    if all_ok
        // All good — show compact success message
        table.cell(check_tbl, 0, 0, "SMC Setup Check", bgcolor = color.new(color.green, 70), text_color = txt, text_halign = text.align_left,  text_size = size.normal)
        table.cell(check_tbl, 1, 0, "✅ All Connected",   bgcolor = color.new(color.green, 70), text_color = txt, text_halign = text.align_right, text_size = size.normal)

        string state_label = src_state >= 6 ? "ENTER LONG" : src_state == 5 ? "READY LONG" : src_state >= 2 ? "PREPARE LONG" : src_state == -1 ? "BLOCKED" : "WAIT"
        check_row(check_tbl, 1, "Core State", state_label, true)
        check_row(check_tbl, 2, "Quality Score", str.tostring(src_quality, '#.##'), src_quality > 0)

        bool has_zone = not na(src_trigger) and src_trigger > 0
        check_row(check_tbl, 3, "Active Zone", has_zone ? "Trigger " + str.tostring(src_trigger, format.mintick) : "No active zone", has_zone)

        table.cell(check_tbl, 0, 4, "", bgcolor = header_bg, text_color = txt, text_size = size.small)
        table.cell(check_tbl, 1, 4, "", bgcolor = header_bg, text_color = txt, text_size = size.small)

        table.cell(check_tbl, 0, 5, "Next Steps", bgcolor = header_bg, text_color = txt, text_halign = text.align_left, text_size = size.small)
        table.cell(check_tbl, 1, 5, "Add Dashboard → connect its Chart Link rows the same way.", bgcolor = header_bg, text_color = txt, text_halign = text.align_right, text_size = size.small)
        table.cell(check_tbl, 0, 6, "",            bgcolor = header_bg, text_color = txt, text_size = size.small)
        table.cell(check_tbl, 1, 6, "Add Strategy  → bind Armed..Invalidation (8 inputs).", bgcolor = header_bg, text_color = txt, text_halign = text.align_right, text_size = size.small)
        table.cell(check_tbl, 0, 7, "",            bgcolor = header_bg, text_color = txt, text_size = size.small)
        table.cell(check_tbl, 1, 7, "Keep this indicator on the chart — the automation verifies the link through it.", bgcolor = header_bg, text_color = txt, text_halign = text.align_right, text_size = size.small)

        table.clear(check_tbl, 0, 8, 1, 9)
    else
        // Not connected — show diagnostic checklist
        table.cell(check_tbl, 0, 0, "SMC Setup Check", bgcolor = color.new(color.red, 70), text_color = txt, text_halign = text.align_left,  text_size = size.normal)
        table.cell(check_tbl, 1, 0, "⚠️ Setup Required",  bgcolor = color.new(color.red, 70), text_color = txt, text_halign = text.align_right, text_size = size.normal)

        table.cell(check_tbl, 0, 1, "", bgcolor = header_bg, text_color = txt, text_size = size.small)
        table.cell(check_tbl, 1, 1, "", bgcolor = header_bg, text_color = txt, text_size = size.small)

        if not schema_ok
            check_row(check_tbl, 2, status_icon(false) + "  SMC Suite", "Not connected — add SMC Long-Dip Suite to the chart first", false)
            check_row(check_tbl, 3, "",                                    "Then open this indicator's settings and connect the Chart Link rows.", false)
        else
            check_row(check_tbl, 2, status_icon(true) + "  SMC Suite",  "Connected (Schema " + str.tostring(src_schema, '#') + ")", true)
            check_row(check_tbl, 3, status_icon(state_ok) + "  StateCode",    state_ok ? "OK" : "Not linked — connect the StateCode row", state_ok)

        check_row(check_tbl, 4, status_icon(armed_ok)   + "  Armed",         armed_ok   ? "OK" : "Not linked — connect the Armed row",        armed_ok)
        check_row(check_tbl, 5, status_icon(quality_ok)  + "  QualityScore",  quality_ok  ? "OK" : "Not linked — connect the QualityScore row", quality_ok)
        check_row(check_tbl, 6, status_icon(trigger_ok)  + "  Trigger",       trigger_ok  ? "OK" : "Not linked — connect the Trigger row",      trigger_ok)
        check_row(check_tbl, 7, status_icon(invalidation_ok) + "  Invalidation", invalidation_ok ? "OK" : "Not linked — connect the Invalidation row", invalidation_ok)

        table.cell(check_tbl, 0, 8, "", bgcolor = header_bg, text_color = txt, text_size = size.small)
        table.cell(check_tbl, 1, 8, "", bgcolor = header_bg, text_color = txt, text_size = size.small)

        table.cell(check_tbl, 0, 9, "💡 How to link", bgcolor = header_bg, text_color = txt, text_halign = text.align_left,  text_size = size.small)
        table.cell(check_tbl, 1, 9, "Settings → each Chart Link row → select the matching SMC Long-Dip Suite output.", bgcolor = header_bg, text_color = txt, text_halign = text.align_right, text_size = size.small)

Overview

SMC Setup Check inspects external source inputs including schema version, state code, armed status, quality score, trigger, and invalidation channels. The script renders a status table directly on the price chart, displaying visual checkmarks and error states to confirm correct wiring. It generates no trading signals and serves solely as a connection verification tool.

Details

Published by

skipp-dev on GitHub

Code credit

preuss_steffen, as written in the script's header

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Screeners & dashboards, SMC / ICT / price action

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
BUS SchemaVersionsourceclosesrc_schema
BUS Armedsourceclosesrc_armed
BUS Triggersourceclosesrc_trigger
BUS Invalidationsourceclosesrc_invalid
BUS QualityScoresourceclosesrc_quality
BUS StateCodesourceclosesrc_state
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

575 stars

The indicator plots ICT displacement candles on the price chart and can switch to retracement scanning. Displacement requires a move larger than a set share of the 14-bar average high-low range, lasting at least a chosen number of bars, with optional close, pr

Indicator v6 SMC / ICT / price actionCandlestick patterns
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Displacement Candles Indicator

Golden Bullet Strategy

by TradersPost
218 stars

The Golden Bullet Strategy is an overlay signal indicator based on Smart Money Concepts and time-based liquidity models. It identifies liquidity sweeps of a designated reference session range during a specified hunt window. It then confirms Market Structure Sh

Indicator v6 SMC / ICT / price actionSessions & time
Updated 3 months ago · None stated GitHub repository of Golden Bullet Strategy
56 stars

This indicator identifies fractal-based pivot highs and lows to map out market structure directly on the price chart. It detects bullish and bearish structure breaks, automatically labeling Break of Structure (BOS) and Change of Character (ChoCH) events when p

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Market Structure (Fractal)
53 stars

Apex Trend & Liquidity Master calculates a trend cloud using customizable moving averages expanded by a volatility multiplier directly on the main price chart. It identifies dynamic support and resistance liquidity zones from swing high and low pivots, extendi

Indicator v6 TrendSupport & resistance
Updated 2 months ago · MPL-2.0 GitHub repository of Apex Trend & Liquidity Master
23 stars

MTF State of Delivery tracks lower timeframe and higher timeframe orderflow delivery states by identifying bullish and bearish delivery levels across timeframes. It plots confirmed and pending orderflow lines directly on the price chart and provides an optiona

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 3 weeks ago · Custom licence GitHub repository of MTF State of Delivery by traderprimez

More indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers