Indicator · Pine Script v6 · Own pane

SMC Profile Context

by skipp-dev· code credited to preuss_steffen

SMC Profile Context is an indicator that operates as a decision-support companion overlay in a separate pane.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code97
Settings9inputs
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

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

SMC_Profile_Context.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 profile-context companion outside the Lite default surface.

// ─────────────────────────────────────────────────────────────────
// SMC Profile Context Overlay — lightweight companion to SMC Core
//
// Visualizes profile + ticker-quality fields from the v5.2 enrichment layer:
//   • Ticker grade badge (A / B / C / D)
//   • VWAP position (above / below / at)
//   • Spread regime (TIGHT / NORMAL / WIDE)
//   • Profile context score bar
//   • Session bias / RTH dominance metrics
//
// Reads mp.* fields from the generated micro-profiles library.
// Keep on a separate pane — independent of trade signals.
// ─────────────────────────────────────────────────────────────────

indicator("SMC Profile Context", overlay = false, max_labels_count = 50)

import preuss_steffen/smc_micro_profiles_generated/569 as mp

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

var g_pc = "Profile Context"
var bool show_grade       = input.bool(true,  "Show ticker grade",       group = g_pc)
var bool show_vwap        = input.bool(true,  "Show VWAP position",     group = g_pc)
var bool show_spread      = input.bool(true,  "Show spread regime",     group = g_pc)
var bool show_score       = input.bool(true,  "Show context score bar", group = g_pc)
var color col_grade_a     = input.color(color.new(color.green, 20),  "Grade A",  group = g_pc)
var color col_grade_b     = input.color(color.new(color.lime, 30),   "Grade B",  group = g_pc)
var color col_grade_c     = input.color(color.new(color.orange, 30), "Grade C",  group = g_pc)
var color col_grade_d     = input.color(color.new(color.red, 30),    "Grade D",  group = g_pc)
var color col_neutral     = input.color(color.new(color.gray, 50),   "Neutral",  group = g_pc)

// ── Profile fields ──────────────────────────────────────────────

string pc_grade        = mp.PROFILE_TICKER_GRADE
string pc_vwap_pos     = mp.PROFILE_VWAP_POSITION
float  pc_vwap_dist    = mp.PROFILE_VWAP_DISTANCE_PCT
string pc_spread       = mp.PROFILE_SPREAD_REGIME
float  pc_avg_spread   = mp.PROFILE_AVG_SPREAD_BPS
string pc_sess_bias    = mp.PROFILE_SESSION_BIAS
float  pc_rth_dom      = mp.PROFILE_RTH_DOMINANCE_PCT
float  pc_pm_q         = mp.PROFILE_PM_QUALITY
float  pc_ah_q         = mp.PROFILE_AH_QUALITY
float  pc_midday_eff   = mp.PROFILE_MIDDAY_EFFICIENCY
float  pc_clean        = mp.PROFILE_CLEAN_SCORE
float  pc_wick         = mp.PROFILE_WICKINESS
int    pc_ctx_score    = mp.PROFILE_CONTEXT_SCORE

// 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)

// ── Grade color helper ──────────────────────────────────────────

color gc = pc_grade == "A" ? col_grade_a : pc_grade == "B" ? col_grade_b : pc_grade == "C" ? col_grade_c : col_grade_d

// ── Context score bar ───────────────────────────────────────────

plot(show_score ? pc_ctx_score : na, "Context Score", gc, 2, plot.style_columns)
hline(3, "Score mid",  color.new(color.gray, 70), hline.style_dotted)

// ── Clean score line ────────────────────────────────────────────

plot(show_score ? pc_clean * 5 : na, "Clean Score", color.new(color.teal, 40), 1, plot.style_line)

// ── VWAP position markers ───────────────────────────────────────

plotshape(show_vwap and pc_vwap_pos == "ABOVE" ? pc_ctx_score : na, "VWAP Above", shape.triangleup,   location.bottom, color.new(color.green, 30), size = size.tiny)
plotshape(show_vwap and pc_vwap_pos == "BELOW" ? pc_ctx_score : na, "VWAP Below", shape.triangledown, location.top,    color.new(color.red, 30),   size = size.tiny)

// ── Spread regime background ────────────────────────────────────

bgcolor(show_spread and pc_spread == "TIGHT" ? color.new(color.green, 92) : show_spread and pc_spread == "WIDE" ? color.new(color.red, 92) : na, title = "Spread regime bg")

// ── Status label ────────────────────────────────────────────────

if barstate.islast
    string info = pc_grade + " | VWAP:" + pc_vwap_pos + " " + str.tostring(pc_vwap_dist, "#.##") + "% | Sprd:" + pc_spread + " " + str.tostring(pc_avg_spread, "#.#") + "bps | Sess:" + pc_sess_bias + " | RTH:" + str.tostring(pc_rth_dom, "#") + "% | Score:" + str.tostring(pc_ctx_score)
    label.new(bar_index, pc_ctx_score + 0.5, info, color = color.new(color.black, 80), textcolor = chart.fg_color, size = size.small, style = label.style_label_down)

Overview

SMC Profile Context imports pre-calculated fields from an external micro-profiles library to display ticker quality metrics and market context. The indicator visualizes a ticker grade badge, VWAP position status, spread regime classification, and a context score bar, alongside session bias and execution quality metrics. Traders can customize inputs to toggle individual metrics on or off and configure color settings for grade tiers.

Details

Published by

skipp-dev on GitHub

Code credit

preuss_steffen, as written in the script's header

Type

Indicator, Pine Script v6

Draws

Separate pane below the chart

Category

SMC / ICT / price action, Screeners & dashboards, Sessions & time

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 ticker gradebooltrueshow_grade
Show VWAP positionbooltrueshow_vwap
Show spread regimebooltrueshow_spread
Show context score barbooltrueshow_score
Grade Acolorcolor.new(color.green, 20)col_grade_a
Grade Bcolorcolor.new(color.lime, 30)col_grade_b
Grade Ccolorcolor.new(color.orange, 30)col_grade_c
Grade Dcolorcolor.new(color.red, 30)col_grade_d
Neutralcolorcolor.new(color.gray, 50)col_neutral
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

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

This indicator detects and draws the first Fair Value Gap (FVG) that forms in each hourly session based on a selected lower timeframe, with specialized handling for Regular Trading Hours (RTH) confluence windows. It draws FVG range boxes, midpoint lines, hourl

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints

Clusterbreak

by Jferheart
15 stars

This indicator identifies Break of Structure (BOS) and Market Structure Shift (MSS) zones, plotting automated bracket levels on the price chart. It triggers signals when a reversal breaks a swing point formed inside an opposing zone, projecting stop loss and t

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 4 weeks ago · None stated GitHub repository of Clusterbreak

MyTTFM - Clean

by dbruce1990
12 stars

MyTTFM - Clean draws a higher-timeframe candle overlay on the price chart and marks related ICT fractal structure. It plots configurable HTF candles, period separator lines, midpoint levels, a T-Spot box, and labels for recent C2 and C3 patterns plus swept lev

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of MyTTFM - Clean
9 stars

Smart Money Dashboard plots key Smart Money Concepts on the price chart, including Order Blocks with mitigation tracking, Fair Value Gaps, and Equal Highs or Lows sweeps. It analyzes Cumulative Volume Delta for divergence and combines multi-timeframe structure

Indicator v6 SMC / ICT / price actionVolume
Updated yesterday · MIT GitHub repository of Smart Money Dashboard

This indicator overlays a market structure dashboard on the price chart. It reads up to seven user-selected timeframes, each with an on/off switch and a trend weight, and shows columns for EMA trend, swing highs and lows, structure, order blocks, and fair valu

Indicator v6 Screeners & dashboardsSMC / ICT / price action
Updated 3 months ago · None stated GitHub repository of Market Structure Dashboard | Flux Charts

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