Market Snapshot

atcsam

Market Structure Expert
Plus
Ulx4jwo.png



⭐ Market Snapshot — A Clean, Concise Read of Market Tone

If you want the market to make sense at a glance, this is the snapshot I built for that.

Most “market watch” scripts dump data.
This one gives you a clear, narrative snapshot of what the market is actually doing — in real time, without the noise.

Example (yesterday’s Market Snapshot)
qzBOGil.png


Yesterday’s Read


  • Market Pulse: Mixed / Fragmented
  • Leadership: Small Caps Leading
  • Risk Tone: Risk‑On (but without real conviction)
  • Economic Tone: Weakening
  • Breadth: Split across indices — some green, some red
Overall: Uncertain, rotational, and choppy. The market was moving, but not in a unified way.

This Morning’s Read

  • Market Pulse: Mild Buying
  • Leadership: Broad participation
  • Risk Tone: Mixed Risk‑Off (cautious but constructive)
  • Economic Tone: Improving
  • Breadth: Cleaner alignment across major indices
Overall: Steadier, more coherent tone. Buyers present, but not aggressive — a healthier backdrop than the night before.

Study Link
Market Snapshot

It focuses on four key dimensions:

1. Market Pulse


Are the major indices aligned or fighting each other?

  • Broad Buying
  • Mild Buying
  • Mixed / Fragmented
  • Mild Selling
  • Broad Selling
2. Leadership Tilt

Who’s driving the tape today?

  • Tech
  • Small Caps
  • Broad Risk‑On
  • Broad Risk‑Off
  • Balanced
3. Risk Tone

Where is the money flowing?

  • Risk‑On = growth, small caps, high beta
  • Risk‑Off = value, defensives, low volatility
    (Risk‑On doesn’t mean “dangerous” — it means the market is favoring risk assets.)
4. Economic Tone

A modern take on transports vs SPY.
Is the real economy participating?

  • Strong
  • Improving
  • Neutral
  • Weakening
  • Contracting
Market Snapshot isn’t a signal generator.
It’s a market narrator — a quick, honest read of what’s happening right now.


hGZw4gD.png



The Fundamental Snippet above and the Market Snapshot below complement one another — at least for me. Together they give a clean, honest read of both the company and the market environment it’s trading in.


Ruby:
#===============================
# Market Snapshot Panel
# Pulse + Leadership + Risk Tone + Economic Tone
#===============================

declare lower;

input showMarket = yes;

#-------------------------------
# GLOBAL COLORS
#-------------------------------
DefineGlobalColor("Buy0", CreateColor(140, 220, 140));   # light green
DefineGlobalColor("Buy1", CreateColor(0, 180, 0));       # medium green
DefineGlobalColor("Buy2", CreateColor(0, 255, 0));       # bright green

DefineGlobalColor("Sell0", CreateColor(255,150,150));    # light red
DefineGlobalColor("Sell1", CreateColor(255,80,80));      # medium red
DefineGlobalColor("Sell2", CreateColor(200,0,0));        # dark red

DefineGlobalColor("Neutral", Color.YELLOW);

#-------------------------------
# RAW UVOL / DVOL DATA
#-------------------------------
def UVOL   = close("$UVOL");
def DVOL   = close("$DVOL");

def UVOLD  = close("$UVOLI");
def DVOLD  = close("$DVOLI");

def UVOLS  = close("$UVOLSP");
def DVOLS  = close("$DVOLSP");

def UVOLN  = close("$UVOL/Q");
def DVOLN  = close("$DVOL/Q");

def UVOLR  = close("$UVOLRL");
def DVOLR  = close("$DVOLRL");

#-------------------------------
# SIGNED RATIOS
#-------------------------------
def SPYRatio =
    if UVOLS >= DVOLS then (UVOLS / DVOLS)
    else -(DVOLS / UVOLS);

def DJIRatio =
    if UVOLD >= DVOLD then (UVOLD / DVOLD)
    else -(DVOLD / UVOLD);

def NDXRatio =
    if UVOLN >= DVOLN then (UVOLN / DVOLN)
    else -(DVOLN / UVOLN);

def RUTRatio =
    if UVOLR >= DVOLR then (UVOLR / DVOLR)
    else -(DVOLR / UVOLR);

def NYSERatio =
    if UVOL >= DVOL then (UVOL / DVOL)
    else -(DVOL / UVOL);

#-------------------------------
# BUCKETS BASED ON ABS VALUE
#-------------------------------
def bucketSPY =
    if AbsValue(SPYRatio) >= 2 then 3 else
    if AbsValue(SPYRatio) >= 1.3 then 2 else
    if AbsValue(SPYRatio) >= 1 then 1 else
    0;

def bucketDJI =
    if AbsValue(DJIRatio) >= 2 then 3 else
    if AbsValue(DJIRatio) >= 1.3 then 2 else
    if AbsValue(DJIRatio) >= 1 then 1 else
    0;

def bucketNDX =
    if AbsValue(NDXRatio) >= 2 then 3 else
    if AbsValue(NDXRatio) >= 1.3 then 2 else
    if AbsValue(NDXRatio) >= 1 then 1 else
    0;

def bucketRUT =
    if AbsValue(RUTRatio) >= 2 then 3 else
    if AbsValue(RUTRatio) >= 1.3 then 2 else
    if AbsValue(RUTRatio) >= 1 then 1 else
    0;

def bucketNYSE =
    if AbsValue(NYSERatio) >= 2 then 3 else
    if AbsValue(NYSERatio) >= 1.3 then 2 else
    if AbsValue(NYSERatio) >= 1 then 1 else
    0;

#-------------------------------
# VOLD UP / DOWN LABEL
#-------------------------------
def VOLD_Up = UVOL / DVOL;
def VOLD_Dn = DVOL / UVOL;

AddLabel(
    showMarket,
    if VOLD_Up > 1 then "VOLD_Up: " + Round(VOLD_Up, 4)
    else "VOLD_Dn: " + Round(VOLD_Dn, 4),
    if VOLD_Up > 1 then Color.CYAN else Color.RED
);

#-------------------------------
# HEADER
#-------------------------------
AddLabel(showMarket, "Market Snapshot", Color.WHITE);

#-------------------------------
# INDEX LABELS
#-------------------------------
AddLabel(
    showMarket,
    "S&P500: " + Round(SPYRatio, 2) + " :1",
    if SPYRatio > 0 then
        (if bucketSPY == 3 then GlobalColor("Buy2")
         else if bucketSPY == 2 then GlobalColor("Buy1")
         else GlobalColor("Buy0"))
    else
        (if bucketSPY == 3 then GlobalColor("Sell2")
         else if bucketSPY == 2 then GlobalColor("Sell1")
         else GlobalColor("Sell0"))
);

AddLabel(
    showMarket,
    "DJI: " + Round(DJIRatio, 2) + " :1",
    if DJIRatio > 0 then
        (if bucketDJI == 3 then GlobalColor("Buy2")
         else if bucketDJI == 2 then GlobalColor("Buy1")
         else GlobalColor("Buy0"))
    else
        (if bucketDJI == 3 then GlobalColor("Sell2")
         else if bucketDJI == 2 then GlobalColor("Sell1")
         else GlobalColor("Sell0"))
);

AddLabel(
    showMarket,
    "QQQ: " + Round(NDXRatio, 2) + " :1",
    if NDXRatio > 0 then
        (if bucketNDX == 3 then GlobalColor("Buy2")
         else if bucketNDX == 2 then GlobalColor("Buy1")
         else GlobalColor("Buy0"))
    else
        (if bucketNDX == 3 then GlobalColor("Sell2")
         else if bucketNDX == 2 then GlobalColor("Sell1")
         else GlobalColor("Sell0"))
);

AddLabel(
    showMarket,
    "R2000: " + Round(RUTRatio, 2) + " :1",
    if RUTRatio > 0 then
        (if bucketRUT == 3 then GlobalColor("Buy2")
         else if bucketRUT == 2 then GlobalColor("Buy1")
         else GlobalColor("Buy0"))
    else
        (if bucketRUT == 3 then GlobalColor("Sell2")
         else if bucketRUT == 2 then GlobalColor("Sell1")
         else GlobalColor("Sell0"))
);

AddLabel(
    showMarket,
    "NYSE: " + Round(NYSERatio, 2) + " :1",
    if NYSERatio > 0 then
        (if bucketNYSE == 3 then GlobalColor("Buy2")
         else if bucketNYSE == 2 then GlobalColor("Buy1")
         else GlobalColor("Buy0"))
    else
        (if bucketNYSE == 3 then GlobalColor("Sell2")
         else if bucketNYSE == 2 then GlobalColor("Sell1")
         else GlobalColor("Sell0"))
);

#-------------------------------
# MARKET PULSE SUMMARY
#-------------------------------
def posCount =
    (SPYRatio > 0) +
    (DJIRatio > 0) +
    (NDXRatio > 0) +
    (RUTRatio > 0) +
    (NYSERatio > 0);

def negCount = 5 - posCount;

def avgBucket =
    (bucketSPY + bucketDJI + bucketNDX + bucketRUT + bucketNYSE) / 5;

AddLabel(
    showMarket,
    if posCount >= 4 and avgBucket >= 2 then "Market Pulse: Broad Buying" else
    if posCount >= 4 then "Market Pulse: Mild Buying" else
    if posCount == 3 then "Market Pulse: Mixed / Fragmented" else
    if negCount >= 4 and avgBucket >= 2 then "Market Pulse: Broad Selling" else
    if negCount >= 4 then "Market Pulse: Mild Selling" else
    "Market Pulse: Indecisive",

    if posCount >= 4 and avgBucket >= 2 then GlobalColor("Buy2") else
    if posCount >= 4 then GlobalColor("Buy0") else
    if posCount == 3 then GlobalColor("Neutral") else
    if negCount >= 4 and avgBucket >= 2 then GlobalColor("Sell2") else
    if negCount >= 4 then GlobalColor("Sell0") else
    Color.GRAY
);

#-------------------------------
# LEADERSHIP TILT (Tech vs Small Caps vs SPY)
#-------------------------------
def techLead = NDXRatio - SPYRatio;
def smallLead = RUTRatio - SPYRatio;

AddLabel(
    showMarket,
    if techLead > 0.3 and techLead > smallLead then "Leadership: Tech Leading" else
    if smallLead > 0.3 and smallLead > techLead then "Leadership: Small Caps Leading" else
    if techLead > 0 and smallLead > 0 then "Leadership: Broad Risk-On" else
    if techLead < 0 and smallLead < 0 then "Leadership: Broad Risk-Off" else
    "Leadership: Balanced",

    if techLead > 0.3 and techLead > smallLead then GlobalColor("Buy1") else
    if smallLead > 0.3 and smallLead > techLead then GlobalColor("Buy1") else
    if techLead > 0 and smallLead > 0 then GlobalColor("Buy0") else
    if techLead < 0 and smallLead < 0 then GlobalColor("Sell0") else
    GlobalColor("Neutral")
);

#-------------------------------
# RISK TONE (Growth vs Value vs SPY)
#-------------------------------
def growthLead = NDXRatio - SPYRatio;
def valueLead = DJIRatio - SPYRatio;

AddLabel(
    showMarket,
    if growthLead > 0.3 and growthLead > valueLead then "Risk Tone: Risk-On" else
    if valueLead > 0.3 and valueLead > growthLead then "Risk Tone: Risk-Off" else
    if growthLead > 0 and valueLead > 0 then "Risk Tone: Mixed Risk-On" else
    if growthLead < 0 and valueLead < 0 then "Risk Tone: Mixed Risk-Off" else
    "Risk Tone: Neutral",

    if growthLead > 0.3 and growthLead > valueLead then GlobalColor("Buy2") else
    if valueLead > 0.3 and valueLead > growthLead then GlobalColor("Sell2") else
    if growthLead > 0 and valueLead > 0 then GlobalColor("Buy0") else
    if growthLead < 0 and valueLead < 0 then GlobalColor("Sell0") else
    GlobalColor("Neutral")
);

#-------------------------------
# ECONOMIC TONE (Modern TRAN Interpretation)
#-------------------------------
def TRAN = close("TRAN");
def SPYc = close("SPY");

# Relative Strength vs SPY (10-day)
def RS_TRAN = TRAN / SPYc;
def RS_TRAN_10 = RS_TRAN / RS_TRAN[10] - 1;

# Momentum (10-day deviation)
def MA10_TRAN = Average(TRAN, 10);
def Dev10 = (TRAN - MA10_TRAN) / MA10_TRAN;

# RSI (Wilder)
def NetChgAvg = WildersAverage(TRAN - TRAN[1], 14);
def TotChgAvg = WildersAverage(AbsValue(TRAN - TRAN[1]), 14);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;
def RSI_TRAN = 50 * (ChgRatio + 1);

AddLabel(
    showMarket,
    "Economic Tone: " +
    (if RS_TRAN_10 > 0.02 and Dev10 > 0 and RSI_TRAN > 55 then "Strong"
     else if RS_TRAN_10 > 0 and Dev10 > 0 then "Improving"
     else if RS_TRAN_10 < -0.02 and Dev10 < 0 and RSI_TRAN < 45 then "Contracting"
     else if RS_TRAN_10 < 0 and Dev10 < 0 then "Weakening"
     else "Neutral"),

    (if RS_TRAN_10 > 0.02 and Dev10 > 0 and RSI_TRAN > 55 then GlobalColor("Buy2")
     else if RS_TRAN_10 > 0 and Dev10 > 0 then GlobalColor("Buy0")
     else if RS_TRAN_10 < -0.02 and Dev10 < 0 and RSI_TRAN < 45 then GlobalColor("Sell2")
     else if RS_TRAN_10 < 0 and Dev10 < 0 then GlobalColor("Sell0")
     else GlobalColor("Neutral"))
);

#-------------------------------
# HIDDEN ANCHOR
#-------------------------------
plot Anchor = 0;
Anchor.Hide();

#===========================================================
# HOW TO READ THIS PANEL
#-----------------------------------------------------------
# This panel gives a quick, honest read of the overall market.
# It does NOT tell you what to trade — it tells you where the
# money is flowing so you can make better decisions.
#
# 1. VOLD (Up/Down Volume)
#    - Shows broad buying or selling pressure across the market.
#
# 2. Index Ratios (S&P, DJI, QQQ, R2000, NYSE)
#    - Green = more buying volume than selling volume.
#    - Red   = more selling volume than buying volume.
#    - Bigger numbers = stronger conviction.
#
# 3. Market Pulse
#    - Broad Buying     = strong, unified market.
#    - Mild Buying/Selling = leaning one way, but not strong.
#    - Mixed/Fragmented = no agreement; choppy conditions.
#
# 4. Leadership Tilt (Tech vs Small Caps vs SPY)
#    - Tech Leading        = growth stocks driving.
#    - Small Caps Leading  = risk-taking in smaller names.
#    - Broad Risk-On       = both are strong.
#    - Broad Risk-Off      = both are weak.
#
# 5. Risk Tone (Growth vs Value)
#    - Risk-On  = Money flowing into growth, small caps,
#                 and high-beta stocks.
#                 It does NOT mean “dangerous” — it means
#                 the market is favoring risk assets.
#    - Risk-Off = Money flowing into value, defensive sectors,
#                 and safer names.
#
# 6. Economic Tone (Transports vs SPY)
#    - Strong/Improving   = real economy participating.
#    - Weakening/Contracting = transports lagging; economic softness.
#    - Neutral            = no clear signal.
#
# Use this panel as a narrative guide:
# It tells you *where* the market is leaning, not what to buy.
#===========================================================
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
1521 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top