OPEN-SOURCE SCRIPT
更新済 Inside/Outside Bars

---
Inside/Outside Bars Detector
This indicator identifies and visualizes Inside Bars and Outside Bars (Engulfing Bars) on your chart, helping traders spot potential breakout and consolidation patterns.
What are Inside/Outside Bars?
• Outside Bars (Outer Bars): Candles that break BOTH the high AND low of the previous candle. These represent periods of increased volatility and potential trend continuation or reversal. Marked with red triangle arrows by default.
• Inside Bars (Inner Bars): Candles where NEITHER the high NOR low breaks the previous candle's range. These represent consolidation and often precede significant price moves. Marked with orange triangle arrows by default.
Features:
✓ Visual arrows above bars for easy identification
✓ Fixed pixel-size arrows that remain visible at any chart zoom level
✓ Statistics table showing counts of outer bars, inner bars, and total bars analyzed
✓ Fully customizable with multiple settings
Customization Options:
• Toggle outer bars and inner bars independently
• Customize arrow colors for each pattern
• Show/hide the statistics table
• Adjust calculation bars (1000 default, max 5000)
• Set to 0 to analyze all available bars up to 5000
How to Use:
Inside bars often indicate consolidation before a breakout, while outside bars suggest increased volatility and potential momentum shifts. Use these patterns in conjunction with your trading strategy to
identify entry/exit points or to confirm trend direction.
---
Inside/Outside Bars Detector
This indicator identifies and visualizes Inside Bars and Outside Bars (Engulfing Bars) on your chart, helping traders spot potential breakout and consolidation patterns.
What are Inside/Outside Bars?
• Outside Bars (Outer Bars): Candles that break BOTH the high AND low of the previous candle. These represent periods of increased volatility and potential trend continuation or reversal. Marked with red triangle arrows by default.
• Inside Bars (Inner Bars): Candles where NEITHER the high NOR low breaks the previous candle's range. These represent consolidation and often precede significant price moves. Marked with orange triangle arrows by default.
Features:
✓ Visual arrows above bars for easy identification
✓ Fixed pixel-size arrows that remain visible at any chart zoom level
✓ Statistics table showing counts of outer bars, inner bars, and total bars analyzed
✓ Fully customizable with multiple settings
Customization Options:
• Toggle outer bars and inner bars independently
• Customize arrow colors for each pattern
• Show/hide the statistics table
• Adjust calculation bars (1000 default, max 5000)
• Set to 0 to analyze all available bars up to 5000
How to Use:
Inside bars often indicate consolidation before a breakout, while outside bars suggest increased volatility and potential momentum shifts. Use these patterns in conjunction with your trading strategy to
identify entry/exit points or to confirm trend direction.
---
リリースノート
percent added to stats table リリースノート
# Inside/Outside Bars DetectorThis indicator identifies and visualizes **Inside Bars**, **Outside Bars** (Engulfing Bars), and **Mother Bars** on your chart, helping traders spot potential breakout and consolidation patterns.
## What are Inside/Outside/Mother Bars?
### Outside Bars (Outer Bars)
Candles that break **BOTH** the high AND low of the previous candle. These represent periods of increased volatility and potential trend continuation or reversal.
- Marked with **red triangle arrows** by default
### Inside Bars (Inner Bars)
Candles where **NEITHER** the high NOR low breaks the previous candle's range. These represent consolidation and often precede significant price moves.
- Marked with **orange triangle arrows** by default
### Mother Bars
Bars where **both** the previous and next bars are inside bars relative to the mother bar. These are significant consolidation zones that often lead to strong breakouts.
- Marked with **blue diamond** by default
## Features
- Visual markers above bars for easy identification
- Statistics table showing:
- Count of each bar type
- Percentage of total bars
- Probability column (based on even distribution analysis)
- Fully customizable colors and toggles
- Configurable calculation period
## Customization Options
| Setting | Description | Default |
|---------|-------------|---------|
| Show Outer Bars | Toggle outer bar markers | On |
| Show Inner Bars | Toggle inner bar markers | On |
| Show Mother Bars | Toggle mother bar markers | On |
| Breaks Both Color | Color for outside bars | Red |
| Breaks Neither Color | Color for inside bars | Orange |
| Mother Bar Color | Color for mother bars | Blue |
| Show Statistics Table | Toggle the info table | On |
| Calculation Bars | Number of bars to analyze (0 = All, max 5000) | 1000 |
| Show Probability Column | Toggle probability display | On |
## Probability Calculation
The probability column estimates the likelihood of each bar type occurring based on even distribution analysis:
- Calculates expected interval based on historical percentage
- Looks back within that expected range
- **Higher probability** when pattern is "overdue" (no occurrences in expected range)
- **Base probability** when one occurrence found in range
- **Lower probability** when multiple occurrences found (pattern is "clustered")
## How to Use
1. **Inside Bars**: Look for breakout opportunities after consolidation periods
2. **Outside Bars**: Identify volatility expansion and potential momentum shifts
3. **Mother Bars**: Watch for strong breakouts after double-inside consolidation patterns
Use these patterns in conjunction with your trading strategy to identify entry/exit points or confirm trend direction.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。