OPEN-SOURCE SCRIPT

Candle Range Detector by TradeTech Analysis

244
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.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.