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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.