OPEN-SOURCE SCRIPT
TTM Squeeze Value Oscillator

This indicator is specifically designed for use with TradingView's Stock Screener, not for chart analysis. It provides numerical values and binary signals that allow traders to efficiently scan stocks for specific TTM Squeeze conditions, momentum patterns, and EMA alignments.
What It Does
The TTM Squeeze Value Oscillator converts the popular TTM Squeeze indicator into a screenable format by outputting specific numerical values and binary signals (1 or 0) that can be filtered in TradingView's screener tool.
Key Features
1. TTM Squeeze Compression Levels
Value 0: Low Compression (Black) - Bollinger Bands inside outer Keltner Channels
Value 1: Mid Compression (Red) - Bollinger Bands inside middle Keltner Channels
Value 2: High Compression (Orange) - Bollinger Bands inside inner Keltner Channels
Value 3: Squeeze Fired (Green) - Bollinger Bands outside Keltner Channels
2. Momentum Analysis
Four distinct momentum conditions based on TTM Squeeze methodology:
Buy Momentum Increasing - Positive momentum growing stronger
Buy Momentum Decreasing - Positive momentum weakening
Sell Momentum Increasing - Negative momentum growing stronger
Sell Momentum Decreasing - Negative momentum weakening
3. EMA Stacking Analysis
Three EMA alignment patterns using 8, 21, and 48 period EMAs:
EMA Stacked Bullish - 8 EMA > 21 EMA > 48 EMA (uptrend alignment)
EMA Stacked Bearish - 8 EMA < 21 EMA < 48 EMA (downtrend alignment)
EMA Mixed - EMAs not in clear bullish or bearish alignment
4. Consecutive Day Counters
Tracks how many consecutive days each squeeze condition has persisted:
Low Compression Days
Mid Compression Days
High Compression Days
Squeeze Fired Days
5. Combined Signal Analysis
Pre-calculated combinations of squeeze conditions with momentum:
All squeeze levels combined with all four momentum conditions
16 total combined signals for advanced screening
What It Does
The TTM Squeeze Value Oscillator converts the popular TTM Squeeze indicator into a screenable format by outputting specific numerical values and binary signals (1 or 0) that can be filtered in TradingView's screener tool.
Key Features
1. TTM Squeeze Compression Levels
Value 0: Low Compression (Black) - Bollinger Bands inside outer Keltner Channels
Value 1: Mid Compression (Red) - Bollinger Bands inside middle Keltner Channels
Value 2: High Compression (Orange) - Bollinger Bands inside inner Keltner Channels
Value 3: Squeeze Fired (Green) - Bollinger Bands outside Keltner Channels
2. Momentum Analysis
Four distinct momentum conditions based on TTM Squeeze methodology:
Buy Momentum Increasing - Positive momentum growing stronger
Buy Momentum Decreasing - Positive momentum weakening
Sell Momentum Increasing - Negative momentum growing stronger
Sell Momentum Decreasing - Negative momentum weakening
3. EMA Stacking Analysis
Three EMA alignment patterns using 8, 21, and 48 period EMAs:
EMA Stacked Bullish - 8 EMA > 21 EMA > 48 EMA (uptrend alignment)
EMA Stacked Bearish - 8 EMA < 21 EMA < 48 EMA (downtrend alignment)
EMA Mixed - EMAs not in clear bullish or bearish alignment
4. Consecutive Day Counters
Tracks how many consecutive days each squeeze condition has persisted:
Low Compression Days
Mid Compression Days
High Compression Days
Squeeze Fired Days
5. Combined Signal Analysis
Pre-calculated combinations of squeeze conditions with momentum:
All squeeze levels combined with all four momentum conditions
16 total combined signals for advanced screening
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.