OPEN-SOURCE SCRIPT
Candle Range Detector by TradeTech Analysis

Candle Range Detector by TradeTech Analysis
This advanced indicator identifies and visualizes price compression zones based on inside bar formations, then tracks how price behaves around those zones — offering valuable insights into liquidity sweeps, range expansions, and trap/mitigation behavior.
The script builds upon the foundational concept of range-based price action, commonly used by institutional traders, and adds automation, mitigation tracking, and sweep detection to map how price reacts around these critical ranges.
🔍 How It Works:
• Range Formation: A new range is detected when the current candle forms entirely within the high and low of the previous candle (i.e., an inside bar). This behavior often indicates price compression and potential breakout zones.
• Range Extension: Once a range is confirmed, the script projects upper and lower boundaries (using either a percentage-based multiplier or Fibonacci log extension), providing context for expected breakout zones.
• Mitigation Tracking: The script continuously monitors whether price breaks above or below the projected extensions, marking that range as mitigated — useful for confirming whether liquidity was absorbed.
• Sweep Detection: If price re-visits a mitigated zone and shows signs of a liquidity sweep (via wick + close behavior), the indicator triggers visual sweep labels and optional alerts.
🧠 Optional Visual Enhancements:
• Highlight range-forming candles with light blue background (toggle on/off)
• Midpoint dotted line for symmetry analysis
• Labels for “Range High” and “Range Low” for visual clarity
• Dynamic box drawing that adapts upon mitigation or continuation
⚙️ Customizable Features:
• Choose between Normal and Fibonacci-based detection modes
• Toggle visibility of range boxes, extension lines, and sweep markers
• Configure sweep alerts, mitigation window size, and visual transparency
⸻
🧪 Use Cases
• Identify consolidation zones before major price moves
• Confirm liquidity sweeps for entry/exit traps
• Visualize and test mitigation behavior of past zones
• Combine with Order Flow or Volume Profile tools to enhance context
⸻
⚠️ This is a fully original implementation that goes beyond classical inside-bar scanners by incorporating mitigation, extension projection, and liquidity sweeps — making it a powerful tool for intraday, swing, and even Smart Money-based trading setups.
This advanced indicator identifies and visualizes price compression zones based on inside bar formations, then tracks how price behaves around those zones — offering valuable insights into liquidity sweeps, range expansions, and trap/mitigation behavior.
The script builds upon the foundational concept of range-based price action, commonly used by institutional traders, and adds automation, mitigation tracking, and sweep detection to map how price reacts around these critical ranges.
🔍 How It Works:
• Range Formation: A new range is detected when the current candle forms entirely within the high and low of the previous candle (i.e., an inside bar). This behavior often indicates price compression and potential breakout zones.
• Range Extension: Once a range is confirmed, the script projects upper and lower boundaries (using either a percentage-based multiplier or Fibonacci log extension), providing context for expected breakout zones.
• Mitigation Tracking: The script continuously monitors whether price breaks above or below the projected extensions, marking that range as mitigated — useful for confirming whether liquidity was absorbed.
• Sweep Detection: If price re-visits a mitigated zone and shows signs of a liquidity sweep (via wick + close behavior), the indicator triggers visual sweep labels and optional alerts.
🧠 Optional Visual Enhancements:
• Highlight range-forming candles with light blue background (toggle on/off)
• Midpoint dotted line for symmetry analysis
• Labels for “Range High” and “Range Low” for visual clarity
• Dynamic box drawing that adapts upon mitigation or continuation
⚙️ Customizable Features:
• Choose between Normal and Fibonacci-based detection modes
• Toggle visibility of range boxes, extension lines, and sweep markers
• Configure sweep alerts, mitigation window size, and visual transparency
⸻
🧪 Use Cases
• Identify consolidation zones before major price moves
• Confirm liquidity sweeps for entry/exit traps
• Visualize and test mitigation behavior of past zones
• Combine with Order Flow or Volume Profile tools to enhance context
⸻
⚠️ This is a fully original implementation that goes beyond classical inside-bar scanners by incorporating mitigation, extension projection, and liquidity sweeps — making it a powerful tool for intraday, swing, and even Smart Money-based trading setups.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
Thanks.
TradeTech Analysis
Telegram Channel - t.me/Tradetech2024
Youtube Channel - youtube.com/@TradeTechAnalysis
Website - tradetechanalysis.com/
TradeTech Analysis
Telegram Channel - t.me/Tradetech2024
Youtube Channel - youtube.com/@TradeTechAnalysis
Website - tradetechanalysis.com/
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
Thanks.
TradeTech Analysis
Telegram Channel - t.me/Tradetech2024
Youtube Channel - youtube.com/@TradeTechAnalysis
Website - tradetechanalysis.com/
TradeTech Analysis
Telegram Channel - t.me/Tradetech2024
Youtube Channel - youtube.com/@TradeTechAnalysis
Website - tradetechanalysis.com/
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。