OPEN-SOURCE SCRIPT
Trend Following

This indicator acts as an all-in-one "Head-Up Display" for Swing Trading. It takes complex criteria—trend, volume, volatility, and market strength—and simplifies them into clear visual signals.
🚦 How It Works (The Traffic Light System)
Instead of guessing if a stock is in a valid setup, just look at the background color:
Green Background: The "Context" is good. The stock has ignited, is trending above key moving averages (10/20/50), and is near 52-week highs.
Lime (Bright Green) Background: Elite Setup. The stock has good context AND high Relative Strength vs the S&P 500. These are your A+ candidates.
No Color: The trend is weak or broken. Move on.
🔍 Key Features
1. The "Tightness" Monitor (VCP) Great breakouts happen when volatility dries up (the "calm before the storm").
Blue "T" Label: Marks bars where price range and volume have tightened significantly.
Base Box: Automatically draws a box around the consolidation area so you can see the "Floor" and the "Ceiling" clearly.
2. Pocket Pivots (New in v8.0)
Blue Dots: These signal "Pocket Pivots"—days where institutional buying volume is quietly stepping in before the breakout occurs. Think of these as "footprints" of smart money.
3. Relative Strength (RS) Filter
This doesn't just look at the stock price. It checks if the stock is outperforming the S&P 500 (SPY).
Dashboard Status: Tells you instantly if the RS Rating is "ELITE" (Leaders) or "LAGGING" (Laggards).
4. Safety Checks
Earnings Warning: A dashed yellow line appears if Earnings are less than 5 days away. Don't get caught by surprise!
Surfing Mode: Detects when a stock is "surfing" the 5-day Moving Average for aggressive momentum trades.
🛠 How to Trade With It
Find the Trend: Look for stocks with a Green/Lime Background.
Wait for the Squeeze: Look for Blue "T" labels or the Gray Box to form. This means the stock is resting.
Spot the Entry: Watch for a Blue Dot (Pocket Pivot) for an early entry, or wait for the price to break above the White Breakout Line.
🚦 How It Works (The Traffic Light System)
Instead of guessing if a stock is in a valid setup, just look at the background color:
Green Background: The "Context" is good. The stock has ignited, is trending above key moving averages (10/20/50), and is near 52-week highs.
Lime (Bright Green) Background: Elite Setup. The stock has good context AND high Relative Strength vs the S&P 500. These are your A+ candidates.
No Color: The trend is weak or broken. Move on.
🔍 Key Features
1. The "Tightness" Monitor (VCP) Great breakouts happen when volatility dries up (the "calm before the storm").
Blue "T" Label: Marks bars where price range and volume have tightened significantly.
Base Box: Automatically draws a box around the consolidation area so you can see the "Floor" and the "Ceiling" clearly.
2. Pocket Pivots (New in v8.0)
Blue Dots: These signal "Pocket Pivots"—days where institutional buying volume is quietly stepping in before the breakout occurs. Think of these as "footprints" of smart money.
3. Relative Strength (RS) Filter
This doesn't just look at the stock price. It checks if the stock is outperforming the S&P 500 (SPY).
Dashboard Status: Tells you instantly if the RS Rating is "ELITE" (Leaders) or "LAGGING" (Laggards).
4. Safety Checks
Earnings Warning: A dashed yellow line appears if Earnings are less than 5 days away. Don't get caught by surprise!
Surfing Mode: Detects when a stock is "surfing" the 5-day Moving Average for aggressive momentum trades.
🛠 How to Trade With It
Find the Trend: Look for stocks with a Green/Lime Background.
Wait for the Squeeze: Look for Blue "T" labels or the Gray Box to form. This means the stock is resting.
Spot the Entry: Watch for a Blue Dot (Pocket Pivot) for an early entry, or wait for the price to break above the White Breakout Line.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.