Indicator · Pine Script v6 · Own pane

MCDX Smart Money

by vtnhqw· code credited to MCDX Smart Money Indicator - Pine Script v6 Recreation

MCDX Smart Money is a separate pane momentum oscillator that calculates and categorizes momentum components into Banker, Hot Money, and Retailer profiles using modified RSI calculations.

View on GitHub

GitHub stars2on the repository
Pine versionv6current
Lines of code131
Settings10inputs
LicenceNone statedfile: MPL-2.0
Last update10 days ago18 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

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

MCDX-SmartMoney.pine
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0
// © MCDX Smart Money Indicator - Pine Script v6 Recreation
// Based on the open-source MCDX formula (RSI-based momentum classifier)
// Credits: Original concept by Mango2Juice / kgiap123 on TradingView
//
// HOW TO READ:
//   🔴 RED   = Banker (Smart Money / Institutional) → BULLISH signal
//   🟡 YELLOW = Hot Money (Short-term / Fast traders) → NEUTRAL / cautious
//   🟢 GREEN  = Retailer (Retail traders) → BEARISH signal (avoid going long)
//
//   ✅ Best to go LONG when: RED bars dominate (>50%) and GREEN is low
//   ❌ Avoid LONG when: GREEN bars dominate (retailers stuck / trapped)

//@version=6
indicator(title="MCDX Smart Money", shorttitle="MCDX", overlay=false, max_bars_back=500)

// ─── INPUTS ───────────────────────────────────────────────────────────────────

var string GRP1 = "🔴 Banker (Smart Money) Settings"
bankerBase    = input.int(50,  "Banker RSI Base",    minval=10, maxval=90, group=GRP1)
bankerPeriod  = input.int(50,  "Banker RSI Period",  minval=5,  maxval=200, group=GRP1)
bankerSens    = input.float(1.5, "Banker Sensitivity", minval=0.1, maxval=10.0, step=0.1, group=GRP1)

var string GRP2 = "🟡 Hot Money Settings"
hotBase       = input.int(30,  "Hot Money RSI Base",   minval=10, maxval=90, group=GRP2)
hotPeriod     = input.int(40,  "Hot Money RSI Period",  minval=5,  maxval=200, group=GRP2)
hotSens       = input.float(0.7, "Hot Money Sensitivity", minval=0.1, maxval=10.0, step=0.1, group=GRP2)

var string GRP3 = "📊 Display Settings"
showMA        = input.bool(true,  "Show Moving Averages", group=GRP3)
maPeriod      = input.int(10,  "MA Period", minval=2, maxval=50, group=GRP3)
showBg        = input.bool(true,  "Show Background Signal", group=GRP3)
showLabels    = input.bool(true,  "Show % Labels", group=GRP3)

// ─── COLORS ──────────────────────────────────────────────────────────────────

COLOR_BANKER   = color.new(color.red,    0)
COLOR_HOT      = color.new(#D4AC0D,      0)   // gold/yellow
COLOR_RETAIL   = color.new(color.green,  0)
COLOR_BANKER_MA = color.new(#FF6B6B,    20)
COLOR_HOT_MA   = color.new(#F7DC6F,     20)
COLOR_RETAIL_MA = color.new(#58D68D,    20)

// ─── MCDX CALCULATION ────────────────────────────────────────────────────────
// Formula: sensitivity * (RSI(period) - base), clamped between 0 and 20
// The "Retailer" chip is the remainder: 20 - max(banker, hotmoney)

mcdx_calc(sens, period, base) =>
    r = ta.rsi(close, period)
    raw = sens * (r - base)
    math.max(0.0, math.min(20.0, raw))

bankerVal  = mcdx_calc(bankerSens, bankerPeriod, bankerBase)
hotVal     = mcdx_calc(hotSens,    hotPeriod,    hotBase)

// Retailer = remaining space up to 20 (after banker takes priority)
// Retailer fills from the bottom (0 to 20), Banker overlays on top
retailVal  = math.max(0.0, 20.0 - math.max(bankerVal, hotVal))

// ─── MOVING AVERAGES ─────────────────────────────────────────────────────────

bankerMA  = ta.sma(bankerVal, maPeriod)
hotMA     = ta.sma(hotVal,    maPeriod)
retailMA  = ta.sma(retailVal, maPeriod)

// ─── PERCENTAGE LABELS ───────────────────────────────────────────────────────

total = bankerVal + hotVal + retailVal
bankerPct  = total > 0 ? (bankerVal  / total) * 100 : 0.0
hotPct     = total > 0 ? (hotVal     / total) * 100 : 0.0
retailPct  = total > 0 ? (retailVal  / total) * 100 : 0.0

// ─── BACKGROUND SIGNAL ───────────────────────────────────────────────────────

// Green BG = Banker dominant (bullish)
// Red BG   = Retailer dominant (bearish/avoid)
bgColor = bankerVal > hotVal and bankerVal > retailVal ? color.new(color.green, 92) :
          retailVal > bankerVal and retailVal > hotVal  ? color.new(color.red,   92) :
          color.new(color.yellow, 95)

bgcolor(showBg ? bgColor : na, title="Background Signal")

// ─── PLOTS ───────────────────────────────────────────────────────────────────

// Base line at 20 (max level reference)
hline(20, "Max Level",  color=color.new(color.gray, 70), linestyle=hline.style_dashed)
hline(10, "Mid Level",  color=color.new(color.gray, 80), linestyle=hline.style_dotted)
hline(0,  "Zero Level", color=color.new(color.gray, 60), linestyle=hline.style_solid)

// Stacked bars: Retailer (bottom/base = full 20), then Hot Money, then Banker on top
plot(20,        title="Retailer Base",  style=plot.style_columns, color=COLOR_RETAIL,  linewidth=1)
plot(hotVal > 0 or bankerVal > 0 ? math.max(hotVal, bankerVal) : na,
                title="Hot Money",      style=plot.style_columns, color=COLOR_HOT,      linewidth=1)
plot(bankerVal > 0 ? bankerVal : na,
                title="Banker",         style=plot.style_columns, color=COLOR_BANKER,   linewidth=1)

// Moving Average Lines
plot(showMA ? bankerMA  : na, title="Banker MA",  color=COLOR_BANKER_MA,  linewidth=2)
plot(showMA ? hotMA     : na, title="Hot MA",     color=COLOR_HOT_MA,     linewidth=2)
plot(showMA ? retailMA  : na, title="Retail MA",  color=COLOR_RETAIL_MA,  linewidth=2)

// ─── INFO TABLE ───────────────────────────────────────────────────────────────

if showLabels and barstate.islast
    var table infoTable = table.new(position.top_right, 2, 4,
         bgcolor=color.new(color.black, 70),
         border_color=color.new(color.gray, 50),
         border_width=1, frame_color=color.new(color.gray, 50), frame_width=1)

    table.cell(infoTable, 0, 0, "MCDX",        text_color=color.white,  text_size=size.small, bgcolor=color.new(color.navy, 30))
    table.cell(infoTable, 1, 0, "Value / %",   text_color=color.silver, text_size=size.small, bgcolor=color.new(color.navy, 30))

    table.cell(infoTable, 0, 1, "🔴 Banker",   text_color=color.red,    text_size=size.small)
    table.cell(infoTable, 1, 1, str.tostring(bankerVal, "#.##") + "  (" + str.tostring(bankerPct, "#.#") + "%)",
               text_color=color.red, text_size=size.small)

    table.cell(infoTable, 0, 2, "🟡 Hot Money", text_color=#D4AC0D,     text_size=size.small)
    table.cell(infoTable, 1, 2, str.tostring(hotVal, "#.##") + "  (" + str.tostring(hotPct, "#.#") + "%)",
               text_color=#D4AC0D, text_size=size.small)

    table.cell(infoTable, 0, 3, "🟢 Retailer",  text_color=color.green,  text_size=size.small)
    table.cell(infoTable, 1, 3, str.tostring(retailVal, "#.##") + "  (" + str.tostring(retailPct, "#.#") + "%)",
               text_color=color.green, text_size=size.small)

// ─── ALERTS ──────────────────────────────────────────────────────────────────

alertcondition(ta.crossover(bankerVal, hotVal),   title="Banker Crossover Hot Money",   message="MCDX: Banker crossed above Hot Money — Bullish signal 🔴")
alertcondition(ta.crossover(bankerVal, retailVal), title="Banker Crossover Retail",     message="MCDX: Banker crossed above Retailer — Strong Bullish 🔴🔴")
alertcondition(ta.crossunder(bankerVal, hotVal),  title="Banker Crossunder Hot Money",  message="MCDX: Banker fell below Hot Money — Caution ⚠️")
alertcondition(bankerVal >= 15,                   title="Strong Banker Zone (>= 15)",   message="MCDX: Banker in Strong Zone (≥15) — Institutional accumulation 🏦")
alertcondition(retailVal >= 18,                   title="Retailer Dominant (>= 18)",    message="MCDX: Retailer dominant — Avoid long, possible distribution 🟢")

Overview

The values are computed using configurable RSI periods, bases, and sensitivity multipliers, clamped within fixed boundaries. It offers optional moving average smoothing lines, background signal highlights, and percentage labels. Designed as a proxy for momentum strength, it visually reflects dominant underlying momentum drivers.

Details

Published by

vtnhqw on GitHub

Code credit

MCDX Smart Money Indicator - Pine Script v6 Recreation, as written in the script's header

Type

Indicator, Pine Script v6

Draws

Separate pane below the chart

Category

Oscillators & momentum

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
Banker RSI Baseint50bankerBase
Banker RSI Periodint50bankerPeriod
Banker Sensitivityfloat1.5bankerSens
Hot Money RSI Baseint30hotBase
Hot Money RSI Periodint40hotPeriod
Hot Money Sensitivityfloat0.7hotSens
Show Moving AveragesbooltrueshowMA
MA Periodint10maPeriod
Show Background SignalbooltrueshowBg
Show % LabelsbooltrueshowLabels
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

Asymmetrical RSI

by everget
948 stars

Asymmetrical RSI is an indicator that computes a custom relative strength index from the rate of change of a user-selected source. It plots the resulting ARSI line in a separate pane with color coding that turns green above the overbought level and red below t

Indicator v4 Oscillators & momentum
Updated 10 days ago · GPL-3.0 GitHub repository of Asymmetrical RSI

This indicator calculates momentum setups based on the Relative Strength Index (RSI) and plots in a separate pane. It offers multiple scanning modes such as Continuous Break, Continuous Retracement, Flip Break, Flip Retracement, and both regular and hidden div

Indicator v6 Oscillators & momentumDivergence Repaints
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - RSI Directional Momentum Indicator

Beep Boop

by magic8bot
409 stars

This indicator calculates a modified MACD oscillator and signal line alongside a trend EMA filter, plotting the output as a stylized column histogram in a separate pane. Instead of plotting true MACD distance, it quantifies positive and negative histogram mome

Indicator v4 Oscillators & momentumTrend
Updated 3 years ago · MIT GitHub repository of Beep Boop
261 stars

This indicator demonstrates an experimental graph-style scatter visualization within a separate pane using Pine Script arrays. It tracks two features across recent bars: the single-bar price change and a scaled 14-period Relative Strength Index. Values are loa

Indicator v4 Oscillators & momentum
Updated 4 years ago · None stated GitHub repository of Example: Graph Style - 4th Dimension RSI

KD指標

by TaichiS
219 stars

This script calculates and plots a Stochastic Oscillator (KD indicator) in a separate chart pane. It determines the fast stochastic value over a 9-period lookback, then applies a 3-period Simple Moving Average (SMA) to create the %K line, and a second 3-period

Indicator v4 Oscillators & momentum
Updated 5 years ago · None stated GitHub repository of KD指標

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