PROTECTED SOURCE SCRIPT
Inside Bar Detector

Inside Bar & Internal Structure
A precise tool for identifying Inside Bars and tracking price range breakouts with internal market structure visualization.
🎯 What It Does
This indicator detects Inside Bars (consolidation patterns) and classifies how price breaks out of established ranges. It helps traders identify:
• Consolidation zones where price is coiling
• Directional breakouts (up or down)
• Liquidity sweeps where price tests both sides before committing to a direction
📊 Key Features
- Inside Bar Detection - Automatically identifies when current bar's range is contained within the previous range
- Range Visualization - Draws dashed rectangle boxes around Inside Bar sequences
- Breakout Classification - Categorizes breaks as: Break High, Break Low, or Expansion
- Sweep Detection - Labels bars that sweep both sides of the range before closing directionally
- Internal Structure Lines - Connects swing highs and lows to visualize market structure
- Statistics Panel - Real-time count of Inside Bars and breakout types
🔧 How It Works
1. Price Range Tracking: The indicator maintains a dynamic price range (high/low) that updates on each breakout
2. Inside Bar Logic: A bar is classified as Inside Bar when its high ≤ range high AND low ≥ range low
3. Breakout Detection:
• Break High: Price closes above the range (bullish)
• Break Low: Price closes below the range (bearish)
• Sweep: Price tests both sides but closes directionally (labeled as Sweep↑ or Sweep↓)
• Expansion: Price breaks both sides but closes in the middle (neutral)
⚙️ Settings
- Display Settings
- Show Inside Bar Box: Toggle rectangle visualization
- Show Statistics: Display count panel
- Show Sweep Labels: Mark liquidity sweep events - Internal Structure Settings
- Show Internal Structure Lines: Connect swing points
- Line Color & Width: Customize appearance - Color Settings
- Inside Bar Box Color & Transparency
📈 How To Use
• Trend Continuation: Look for Inside Bars forming after a strong move, then trade the breakout in the trend direction
• Reversal Setups: Watch for sweep patterns (Sweep↑/Sweep↓) at key levels - these often indicate liquidity grabs before reversals
• Structure Analysis: Use internal structure lines to identify the current market bias
⚠️ Alerts
The indicator includes 4 alert conditions:
• Inside Bar Detected
• Break High (includes bullish sweeps)
• Break Low (includes bearish sweeps)
• Dual Expansion (neutral)
📋 Notes
• Works on all timeframes and instruments
• Consecutive Inside Bars are merged into a single box for cleaner visualization
• Internal structure lines ignore Inside Bars to reduce noise
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 이를 자유롭게 제한 없이 사용할 수 있습니다 – 자세한 내용은 여기에서 확인하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 이를 자유롭게 제한 없이 사용할 수 있습니다 – 자세한 내용은 여기에서 확인하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.