OPEN-SOURCE SCRIPT
ที่อัปเดต: Exhaustion Indicator

The ScalpSQZ indicator is designed to identify four critical market states using volatility structure, momentum behavior, and exhaustion conditions. It enhances scalping precision by visually marking transitions between consolidation, squeeze conditions, and momentum reversals through color-coded candles.
1. Squeeze Conditions (Orange Candles)
Orange candles highlight volatility compression, detected when Bollinger Bands contract inside the Keltner Channels. This structure signals that market volatility is tightening and a significant expansion move is likely to follow. The squeeze represents a pre-breakout environment and serves as the earliest warning of a potential directional shift.
2. Consolidation Conditions (Yellow Candles)
Yellow candles identify phases of low directional momentum. These conditions occur when RSI remains near neutral values, MACD histogram activity is minimal, and the Rate of Change stays muted. This combination indicates that the market is balanced and non-trending, often preceding a volatility spike or a new trend. Consolidation helps traders avoid low-probability entries during indecisive price action.
3. Momentum Exhaustion — Overbought Fade (White Candles)
White candles signal potential top-side exhaustion. This occurs when RSI enters overbought territory while the MACD histogram begins to weaken compared to the previous bar. This condition does not necessarily call a reversal but warns that bullish momentum is deteriorating and upside continuation may be limited. It is particularly useful for identifying trend fatigue and tightening stop-loss placement.
4. Momentum Exhaustion — Oversold Fade (Purple Candles)
Purple candles identify bottom-side exhaustion and appear when RSI reaches oversold levels, MACD momentum begins improving, and the current close shows buyer defense relative to the previous low. This condition suggests selling pressure is diminishing and a potential reversal or relief bounce may be forming. Purple candles serve as an early indication of bearish trend exhaustion.
Color Priority System
The indicator follows a fixed hierarchy to ensure clarity:
Squeeze (orange) has the highest priority, followed by consolidation (yellow). Exhaustion signals (white for tops, purple for bottoms) apply only when no squeeze or consolidation conditions are active. This structure ensures that the most critical market states are always highlighted first.
Purpose and Application
ScalpSQZ helps traders identify optimal environments for breakouts, anticipate trend exhaustion, and avoid low-quality trades during choppy or low-momentum conditions. It is suitable for scalping, day trading, and swing trading across any asset class or timeframe.
1. Squeeze Conditions (Orange Candles)
Orange candles highlight volatility compression, detected when Bollinger Bands contract inside the Keltner Channels. This structure signals that market volatility is tightening and a significant expansion move is likely to follow. The squeeze represents a pre-breakout environment and serves as the earliest warning of a potential directional shift.
2. Consolidation Conditions (Yellow Candles)
Yellow candles identify phases of low directional momentum. These conditions occur when RSI remains near neutral values, MACD histogram activity is minimal, and the Rate of Change stays muted. This combination indicates that the market is balanced and non-trending, often preceding a volatility spike or a new trend. Consolidation helps traders avoid low-probability entries during indecisive price action.
3. Momentum Exhaustion — Overbought Fade (White Candles)
White candles signal potential top-side exhaustion. This occurs when RSI enters overbought territory while the MACD histogram begins to weaken compared to the previous bar. This condition does not necessarily call a reversal but warns that bullish momentum is deteriorating and upside continuation may be limited. It is particularly useful for identifying trend fatigue and tightening stop-loss placement.
4. Momentum Exhaustion — Oversold Fade (Purple Candles)
Purple candles identify bottom-side exhaustion and appear when RSI reaches oversold levels, MACD momentum begins improving, and the current close shows buyer defense relative to the previous low. This condition suggests selling pressure is diminishing and a potential reversal or relief bounce may be forming. Purple candles serve as an early indication of bearish trend exhaustion.
Color Priority System
The indicator follows a fixed hierarchy to ensure clarity:
Squeeze (orange) has the highest priority, followed by consolidation (yellow). Exhaustion signals (white for tops, purple for bottoms) apply only when no squeeze or consolidation conditions are active. This structure ensures that the most critical market states are always highlighted first.
Purpose and Application
ScalpSQZ helps traders identify optimal environments for breakouts, anticipate trend exhaustion, and avoid low-quality trades during choppy or low-momentum conditions. It is suitable for scalping, day trading, and swing trading across any asset class or timeframe.
เอกสารเผยแพร่
UPDATE:The purple candle marks a strict selling-exhaustion condition designed to highlight potential capitulation lows. This filter is intentionally conservative and only triggers when multiple forms of downside pressure begin to weaken simultaneously.
A purple bar appears only if ALL of the following are true:
RSI is deeply oversold
rsi_val < 32
Indicates that short-term momentum has reached extreme levels.
MACD histogram begins rising from a negative state
histogram > histogram[1]
Shows that bearish momentum is losing strength even though price may still be depressed.
Price holds above the prior low
close > low[1]
Confirms buyers are defending a level instead of allowing continuation-selling.
Together, these conditions detect when sellers have likely exhausted their strength and the market is transitioning from capitulation toward absorption.
Purple signals do not guarantee reversals, but statistically appear near high-quality bottom structures and failed breakdowns.
This update improves the prior version by enforcing stronger mathematical confirmation, reducing noise, and restricting purple candles to genuine exhaustion events.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน