Momentum Monitor Table

TradingView Lab Tool

What is the Momentum Monitor?

Unlike standard scanners, the Momentum Monitor lives directly on your chart. It acts as a "Heads Up Display" (HUD) for your most-watched tickers, using custom Pine Script logic to alert you to high-velocity moves as they happen.

  • Volume Spike Detection: Highlights symbols trading 150%+ above their 20-period average volume.
  • Price Velocity: Tracks "Rate of Change" to find stocks moving faster than 2% in a 5-bar window.
  • Zero Tab Switching: Watch your primary chart while the table monitors the rest of the market for you.

🚀 Setup Instructions

1
Copy the Script: Click the "Copy Script" button in the black box below.
2
Open Pine Editor: In TradingView, click the "Pine Editor" tab at the bottom of your screen.
3
Install: Delete any text in the editor, paste the new code, and click "Add to Chart."
Pro Tip: To change the symbols or move the table, click the Settings (Gear Icon) next to the indicator name on your chart. You can move the table to any corner of the screen from there.
//@version=5
indicator("DTL Lab - Momentum Monitor", overlay=true)

// --- POSITION SETTINGS ---
table_pos = input.string("top_right", "Table Position", options=["top_right", "bottom_right", "top_left", "bottom_left", "top_center", "bottom_center"])

pos_val = table_pos == "top_right" ? position.top_right : 
          table_pos == "bottom_right" ? position.bottom_right : 
          table_pos == "top_left" ? position.top_left : 
          table_pos == "bottom_left" ? position.bottom_left : 
          table_pos == "top_center" ? position.top_center : position.bottom_center

// --- Ticker Inputs ---
t1 = input.symbol("AAPL", "Ticker 1"), t2 = input.symbol("TSLA", "Ticker 2")
t3 = input.symbol("NVDA", "Ticker 3"), t4 = input.symbol("AMD", "Ticker 4")
t5 = input.symbol("META", "Ticker 5"), t6 = input.symbol("MSFT", "Ticker 6")

vol_threshold = input.float(1.5, "Volume Spike (x Avg)", step=0.1)
mom_threshold = input.float(2.0, "Momentum Threshold (%)", step=0.1)

// --- Logic Function ---
checkMomentum(sym) =>
    [c, v, rv] = request.security(sym, timeframe.period, [close, volume, ta.sma(volume, 20)])
    mom = ta.roc(c, 5) 
    is_spiking = v > (rv * vol_threshold) and mom > mom_threshold
    [mom, is_spiking]

// --- Execution ---
[m1, s1] = checkMomentum(t1), [m2, s2] = checkMomentum(t2)
[m3, s3] = checkMomentum(t3), [m4, s4] = checkMomentum(t4)
[m5, s5] = checkMomentum(t5), [m6, s6] = checkMomentum(t6)

// --- UI Table ---
var tbl = table.new(pos_val, 2, 7, frame_color=color.gray, frame_width=1)
if barstate.islast
    table.cell(tbl, 0, 0, "Symbol", bgcolor=color.new(color.blue, 80), text_color=color.white)
    table.cell(tbl, 1, 0, "Momentum", bgcolor=color.new(color.blue, 80), text_color=color.white)
    
    table.cell(tbl, 0, 1, t1, text_color=color.white)
    table.cell(tbl, 1, 1, str.tostring(m1, "#.##") + "%", bgcolor = s1 ? color.green : color.new(color.gray, 20), text_color=color.white)
    
    table.cell(tbl, 0, 2, t2, text_color=color.white)
    table.cell(tbl, 1, 2, str.tostring(m2, "#.##") + "%", bgcolor = s2 ? color.green : color.new(color.gray, 20), text_color=color.white)
    
    table.cell(tbl, 0, 3, t3, text_color=color.white)
    table.cell(tbl, 1, 3, str.tostring(m3, "#.##") + "%", bgcolor = s3 ? color.green : color.new(color.gray, 20), text_color=color.white)
    
    table.cell(tbl, 0, 4, t4, text_color=color.white)
    table.cell(tbl, 1, 4, str.tostring(m4, "#.##") + "%", bgcolor = s4 ? color.green : color.new(color.gray, 20), text_color=color.white)
    
    table.cell(tbl, 0, 5, t5, text_color=color.white)
    table.cell(tbl, 1, 5, str.tostring(m5, "#.##") + "%", bgcolor = s5 ? color.green : color.new(color.gray, 20), text_color=color.white)
    
    table.cell(tbl, 0, 6, t6, text_color=color.white)
    table.cell(tbl, 1, 6, str.tostring(m6, "#.##") + "%", bgcolor = s6 ? color.green : color.new(color.gray, 20), text_color=color.white)
Common Issues:
Delayed Data: If your table isn't updating, check if your TradingView account has real-time data for that exchange.
Max Symbols: TradingView limits custom scripts to 40 "external" symbol requests. To monitor more, simply add a second instance of the script with different tickers.
⚠️ Disclaimer: Trading involves the risk of financial loss. These scripts are provided for educational purposes and are not a recommendation to buy or sell securities. Always use stop losses and manage your risk.