TV Script - Trading Dashboard Documentation

Comprehensive documentation for TradingView Pine Script indicators and trading strategies

View the Project on GitHub tekram/tv-script

Bottom Right Table - EMA Clouds & Market Breadth

Overview

The Bottom Right Table provides comprehensive market timing and breadth analysis through EMA cloud indicators, VIX sentiment analysis, and SPY market condition assessment. This component helps traders determine:

Bottom Right Table Dashboard

Example of the Bottom Right Table showing EMA clouds, VIX clouds, market breadth indicators, and SPY analysis

Table Layout

Top Section: EMA Clouds (Left) & VIX Clouds (Right)

Stock EMA Clouds (Left Side)

These clouds analyze the stock’s own trend using a 10-minute timeframe:

Usage:

VIX EMA Clouds (Right Side)

These clouds analyze market sentiment using VIX on a 10-minute timeframe:

Usage:

Bottom Section: Market Breadth & SPY Analysis

Market Breadth Indicators (Bottom Left)

Helps identify market breadth extremes for both short-term and mid-term analysis:

Usage:

SPY Market Condition (Bottom Right)

Helps determine optimal trade timeframe based on SPY’s position relative to key moving averages:

Trade Condition Display:

Days SPY > 20 EMA:

Days Since Low < EMA:

Technical Details

EMA Cloud Calculations

// Stock EMAs on 10-minute timeframe
[ema5, ema12, ema34, ema50] = request.security(syminfo.tickerid, '10', 
    [ta.ema(close, 5), ta.ema(close, 12), ta.ema(close, 34), ta.ema(close, 50)])

// VIX EMAs on 10-minute timeframe
[vix_ema5, vix_ema12, vix_ema34, vix_ema50] = request.security('VIX', '10', 
    [ta.ema(close, 5), ta.ema(close, 12), ta.ema(close, 34), ta.ema(close, 50)])

Market Breadth Calculations

// Percentage above 5-day SMA
percent_above_5 = request.security('NDFD', '1D', close)

// Percentage above 20-day SMA
percent_above_20 = request.security('S5TW', '1D', close)

SPY Analysis

// SPY daily close and MAs
spy = request.security('SPY', 'D', close)
ma50 = ta.sma(spy, 50)
ma20 = ta.ema(spy, 20)

// Conditions
above_50_and_20 = spy > ma50 and spy > ma20
above_50 = spy > ma50
above_20 = spy > ma20
below_50 = spy < ma50

Trading Applications

Entry Timing

  1. Check Stock Clouds: Both 5-12 and 34-50 bullish = favorable trend
  2. Check VIX Clouds: Rising VIX (bullish clouds) = contrarian bullish signal
  3. Check Breadth: Oversold breadth (< 20% on 5-day, < 30% on 20-day) = good entry
  4. Check SPY Condition: Above 20 & 50 = longer holds possible

Position Sizing

Trade Timeframe Selection

Risk Management

Best Practices

  1. Wait for Alignment: Best setups when stock clouds, breadth, and SPY all align
  2. Use VIX as Contrarian: Rising VIX (bullish clouds) often precedes market bottoms
  3. Monitor Breadth Extremes: Oversold breadth + bullish clouds = high probability setup
  4. Respect SPY Condition: Don’t fight the market - adjust timeframe based on SPY position
  5. Track Days Above EMA: Longer streaks = stronger trends = larger position sizes

Configuration Options

Display Toggles

EMA Lengths

Visual Settings

Request Call Efficiency