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.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。