OPEN-SOURCE SCRIPT
Diupdate

Inside/Outside Bar Sequence Detector

509
# Inside/Outside Bar Sequence Detector

## English Description

**Inside/Outside Bar Sequence Detector**

This indicator identifies and visualizes sequences of Inside and Outside bars on any chart. It highlights important price action patterns that can signal potential market reversals or continuation moves.

**Key Features:**
- Automatically detects consecutive Inside bars (where price action is contained within the previous bar's range) and Outside bars (where price action exceeds the previous bar's range)
- Displays sequences with customizable labels showing the pattern type
- Highlights the price range of each sequence with a transparent box
- Marks individual Inside bars with "i" and Outside bars with "o" below each candle
- Applies special pattern recognition rules for more accurate trade signals
- Fully customizable appearance including colors, opacity, and label positioning

Adjust the minimum sequence length according to your trading timeframe and strategy to filter out noise and focus on significant patterns.

## ไธญๆ–‡ๆ่ฟฐ

**ๅ†…ๅŒ…/ๅค–ๅŒ…K็บฟๅบๅˆ—ๆฃ€ๆต‹ๅ™จ**

่ฟ™ไธชๆŒ‡ๆ ‡ๅฏไปฅ่ฏ†ๅˆซๅนถๅฏ่ง†ๅŒ–ไปปไฝ•ๅ›พ่กจไธŠ็š„ๅ†…ๅŒ…ๅ’Œๅค–ๅŒ…K็บฟๅบๅˆ—ใ€‚ๅฎƒ็ชๅ‡บๆ˜พ็คบ้‡่ฆ็š„ไปทๆ ผ่กŒไธบๆจกๅผ๏ผŒ่ฟ™ไบ›ๆจกๅผๅฏ่ƒฝ้ข„็คบๅธ‚ๅœบๆฝœๅœจ็š„ๅ่ฝฌๆˆ–ๅปถ็ปญ่ตฐๅŠฟใ€‚

**ไธป่ฆ็‰น็‚น๏ผš**
- ่‡ชๅŠจๆฃ€ๆต‹่ฟž็ปญ็š„ๅ†…ๅŒ…K็บฟ๏ผˆไปทๆ ผๆดปๅŠจ่ขซ้™ๅˆถๅœจๅ‰ไธ€ๆ นK็บฟ่Œƒๅ›ดๅ†…๏ผ‰ๅ’Œๅค–ๅŒ…K็บฟ๏ผˆไปทๆ ผๆดปๅŠจ่ถ…ๅ‡บๅ‰ไธ€ๆ นK็บฟ่Œƒๅ›ด๏ผ‰
- ้€š่ฟ‡ๅฏ่‡ชๅฎšไน‰็š„ๆ ‡็ญพๆ˜พ็คบๆจกๅผ็ฑปๅž‹
- ็”จ้€ๆ˜Žๆก†็ชๅ‡บๆ˜พ็คบๆฏไธชๅบๅˆ—็š„ไปทๆ ผ่Œƒๅ›ด
- ๅœจๆฏๆ นK็บฟไธ‹ๆ–น็”จ"i"ๆ ‡่ฎฐๅ†…ๅŒ…่œก็ƒ›๏ผŒ็”จ"o"ๆ ‡่ฎฐๅค–ๅŒ…่œก็ƒ›
- ๅบ”็”จ็‰นๆฎŠๆจกๅผ่ฏ†ๅˆซ่ง„ๅˆ™๏ผŒๆไพ›ๆ›ดๅ‡†็กฎ็š„ไบคๆ˜“ไฟกๅท
- ๅฎŒๅ…จๅฏ่‡ชๅฎšไน‰็š„ๅค–่ง‚๏ผŒๅŒ…ๆ‹ฌ้ขœ่‰ฒใ€้€ๆ˜Žๅบฆๅ’Œๆ ‡็ญพไฝ็ฝฎ

ๆ นๆฎๆ‚จ็š„ไบคๆ˜“ๆ—ถ้—ดๆก†ๆžถๅ’Œ็ญ–็•ฅ่ฐƒๆ•ดๆœ€ๅฐๅบๅˆ—้•ฟๅบฆ๏ผŒไปฅ่ฟ‡ๆปคๅ™ช้Ÿณๅนถไธ“ๆณจไบŽ้‡่ฆๆจกๅผใ€‚
Catatan Rilis
Inside/Outside Bar & Micro Channel Detector

English Description

Overview

The Inside/Outside Bar & Micro Channel Detector is a comprehensive Pine Script indicator designed for TradingView that identifies and visualizes
two powerful price action patterns: Inside/Outside Bar sequences and Micro Channels. This dual-purpose tool helps traders spot consolidation
periods and trending micro-structures in any timeframe.

Key Features

๐Ÿ“Š Inside/Outside Bar Detection

- Inside Bars: Identifies candles with high โ‰ค previous high and low โ‰ฅ previous low
- Outside Bars: Identifies candles with high โ‰ฅ previous high and low โ‰ค previous low
- Sequence Detection: Groups consecutive Inside/Outside bars into meaningful sequences
- Smart Filtering: Applies intelligent rules to filter out noise and highlight significant patterns
- Visual Markers: Displays sequence labels and background highlighting

๐Ÿ“ˆ Micro Channel Detection

- Bullish Micro Channels: Detects sequences where lows progressively rise or remain equal
- Bearish Micro Channels: Detects sequences where highs progressively fall or remain equal
- Dynamic Trend Lines: Draws trend lines connecting channel boundaries
- Real-time Updates: Updates trend lines as channels extend or terminate
- Historical Persistence: Preserves completed channel trend lines for reference

Settings & Customization

Inside/Outside Bar Settings

- Minimum Sequence Length (2-10): Set the minimum bars required for a valid sequence
- Marker Color & Opacity: Customize the appearance of individual bar markers
- Label Settings: Control text color, size, and position of sequence labels
- Background Box: Configure color and opacity of sequence highlighting

Micro Channel Settings

- Enable/Disable: Toggle Micro Channel detection on/off
- MC Minimum Length (3-20): Set minimum bars required for a valid channel
- Trend Line Width (1-5): Adjust thickness of channel trend lines
- Trend Line Opacity (0-100%): Control transparency of all trend lines
- Color Settings: Separate colors for bullish and bearish channels

How to Use

1. Add to Chart: Apply the indicator to any chart and timeframe
2. Configure Settings: Adjust parameters in the "Inputs" tab to match your trading style
3. Interpret Signals:
- Inside/Outside bar sequences often indicate consolidation before breakouts
- Micro Channels show short-term trending behavior and potential reversal points
4. Combine with Other Analysis: Use alongside support/resistance, volume, and other indicators for comprehensive analysis

Best Practices

- Use on multiple timeframes for confluence
- Combine with volume analysis for better signal quality
- Pay attention to sequence breaks as potential reversal signals
- Adjust opacity settings based on chart background for optimal visibility

Technical Specifications

- Pine Script Version: v6
- Overlay: True (draws on price chart)
- Max Objects: 500 labels, 500 boxes, 500 lines
- Author: WendellZhang
- License: Mozilla Public License 2.0

---
ไธญๆ–‡่ฏดๆ˜Ž

ๆฆ‚่ฟฐ

Inside/Outside Bar & Micro Channel Detector๏ผˆๅ†…ๅŒ…ๅค–ๅŒ…K็บฟไธŽๅพฎ้€š้“ๆฃ€ๆต‹ๅ™จ๏ผ‰ๆ˜ฏไธ€ไธชไธบTradingView่ฎพ่ฎก็š„็ปผๅˆๆ€งPine
ScriptๆŒ‡ๆ ‡๏ผŒ่ƒฝๅคŸ่ฏ†ๅˆซๅ’Œๅฏ่ง†ๅŒ–ไธค็งๅผบๅคง็š„ไปทๆ ผ่กŒไธบๆจกๅผ๏ผšๅ†…ๅŒ…/ๅค–ๅŒ…K็บฟๅบๅˆ—ๅ’Œๅพฎ้€š้“ใ€‚่ฟ™ไธชๅŒๅŠŸ่ƒฝๅทฅๅ…ทๅธฎๅŠฉไบคๆ˜“่€…ๅœจไปปไฝ•ๆ—ถ้—ดๆก†ๆžถๅ†…ๅ‘็Žฐ็›˜ๆ•ดๆœŸๅ’Œ่ถ‹ๅŠฟๅพฎ็ป“ๆž„ใ€‚

ๆ ธๅฟƒๅŠŸ่ƒฝ

๐Ÿ“Š ๅ†…ๅŒ…/ๅค–ๅŒ…K็บฟๆฃ€ๆต‹

- ๅ†…ๅŒ…K็บฟ๏ผš่ฏ†ๅˆซๆœ€้ซ˜ไปท โ‰ค ๅ‰ไธ€ๆ นๆœ€้ซ˜ไปทไธ”ๆœ€ไฝŽไปท โ‰ฅ ๅ‰ไธ€ๆ นๆœ€ไฝŽไปท็š„K็บฟ
- ๅค–ๅŒ…K็บฟ๏ผš่ฏ†ๅˆซๆœ€้ซ˜ไปท โ‰ฅ ๅ‰ไธ€ๆ นๆœ€้ซ˜ไปทไธ”ๆœ€ไฝŽไปท โ‰ค ๅ‰ไธ€ๆ นๆœ€ไฝŽไปท็š„K็บฟ
- ๅบๅˆ—ๆฃ€ๆต‹๏ผšๅฐ†่ฟž็ปญ็š„ๅ†…ๅŒ…/ๅค–ๅŒ…K็บฟ็ป„ๅˆๆˆๆœ‰ๆ„ไน‰็š„ๅบๅˆ—
- ๆ™บ่ƒฝ่ฟ‡ๆปค๏ผšๅบ”็”จๆ™บ่ƒฝ่ง„ๅˆ™่ฟ‡ๆปคๅ™ช้Ÿณ๏ผŒ็ชๅ‡บ้‡่ฆๆจกๅผ
- ่ง†่ง‰ๆ ‡่ฎฐ๏ผšๆ˜พ็คบๅบๅˆ—ๆ ‡็ญพๅ’Œ่ƒŒๆ™ฏ้ซ˜ไบฎ

๐Ÿ“ˆ ๅพฎ้€š้“ๆฃ€ๆต‹

- ๅคšๅคดๅพฎ้€š้“๏ผšๆฃ€ๆต‹ไฝŽ็‚น้€ๆญฅๆŠฌ้ซ˜ๆˆ–ไฟๆŒ็›ธ็ญ‰็š„ๅบๅˆ—
- ็ฉบๅคดๅพฎ้€š้“๏ผšๆฃ€ๆต‹้ซ˜็‚น้€ๆญฅ้™ไฝŽๆˆ–ไฟๆŒ็›ธ็ญ‰็š„ๅบๅˆ—
- ๅŠจๆ€่ถ‹ๅŠฟ็บฟ๏ผš็ป˜ๅˆถ่ฟžๆŽฅ้€š้“่พน็•Œ็š„่ถ‹ๅŠฟ็บฟ
- ๅฎžๆ—ถๆ›ดๆ–ฐ๏ผš้š็€้€š้“ๅปถไผธๆˆ–็ปˆๆญขๆ›ดๆ–ฐ่ถ‹ๅŠฟ็บฟ
- ๅކๅฒไฟๆŒ๏ผšไฟ็•™ๅทฒๅฎŒๆˆ็š„้€š้“่ถ‹ๅŠฟ็บฟไพ›ๅ‚่€ƒ

่ฎพ็ฝฎไธŽๅฎšๅˆถ

ๅ†…ๅŒ…/ๅค–ๅŒ…K็บฟ่ฎพ็ฝฎ

- ๆœ€ๅฐๅบๅˆ—้•ฟๅบฆ (2-10)๏ผš่ฎพ็ฝฎๆœ‰ๆ•ˆๅบๅˆ—ๆ‰€้œ€็š„ๆœ€ๅฐ‘K็บฟๆ•ฐ้‡
- ๆ ‡่ฎฐ้ขœ่‰ฒไธŽ้€ๆ˜Žๅบฆ๏ผš่‡ชๅฎšไน‰ๅ•ไธชK็บฟๆ ‡่ฎฐ็š„ๅค–่ง‚
- ๆ ‡็ญพ่ฎพ็ฝฎ๏ผšๆŽงๅˆถๅบๅˆ—ๆ ‡็ญพ็š„ๆ–‡ๅญ—้ขœ่‰ฒใ€ๅคงๅฐๅ’Œไฝ็ฝฎ
- ่ƒŒๆ™ฏๆก†๏ผš้…็ฝฎๅบๅˆ—้ซ˜ไบฎ็š„้ขœ่‰ฒๅ’Œ้€ๆ˜Žๅบฆ

ๅพฎ้€š้“่ฎพ็ฝฎ

- ๅฏ็”จ/็ฆ็”จ๏ผšๅผ€ๅฏๆˆ–ๅ…ณ้—ญๅพฎ้€š้“ๆฃ€ๆต‹
- MCๆœ€ๅฐ้•ฟๅบฆ (3-20)๏ผš่ฎพ็ฝฎๆœ‰ๆ•ˆ้€š้“ๆ‰€้œ€็š„ๆœ€ๅฐ‘K็บฟๆ•ฐ้‡
- ่ถ‹ๅŠฟ็บฟๅฎฝๅบฆ (1-5)๏ผš่ฐƒๆ•ด้€š้“่ถ‹ๅŠฟ็บฟ็š„็ฒ—็ป†
- ่ถ‹ๅŠฟ็บฟ้€ๆ˜Žๅบฆ (0-100%)๏ผšๆŽงๅˆถๆ‰€ๆœ‰่ถ‹ๅŠฟ็บฟ็š„้€ๆ˜Žๅบฆ
- ้ขœ่‰ฒ่ฎพ็ฝฎ๏ผšไธบๅคšๅคดๅ’Œ็ฉบๅคด้€š้“่ฎพ็ฝฎไธๅŒ้ขœ่‰ฒ

ไฝฟ็”จๆ–นๆณ•

1. ๆทปๅŠ ๅˆฐๅ›พ่กจ๏ผšๅฐ†ๆŒ‡ๆ ‡ๅบ”็”จๅˆฐไปปไฝ•ๅ›พ่กจๅ’Œๆ—ถ้—ดๆก†ๆžถ
2. ้…็ฝฎ่ฎพ็ฝฎ๏ผšๅœจ"่พ“ๅ…ฅ"้€‰้กนๅกไธญ่ฐƒๆ•ดๅ‚ๆ•ฐไปฅๅŒน้…ๆ‚จ็š„ไบคๆ˜“้ฃŽๆ ผ
3. ่งฃ่ฏปไฟกๅท๏ผš
- ๅ†…ๅŒ…/ๅค–ๅŒ…K็บฟๅบๅˆ—้€šๅธธ่กจ็คบ็ช็ ดๅ‰็š„็›˜ๆ•ด
- ๅพฎ้€š้“ๆ˜พ็คบ็ŸญๆœŸ่ถ‹ๅŠฟ่กŒไธบๅ’Œๆฝœๅœจๅ่ฝฌ็‚น
4. ็ป“ๅˆๅ…ถไป–ๅˆ†ๆž๏ผšไธŽๆ”ฏๆ’‘/้˜ปๅŠ›ใ€ๆˆไบค้‡ๅ’Œๅ…ถไป–ๆŒ‡ๆ ‡็ป“ๅˆไฝฟ็”จ๏ผŒ่ฟ›่กŒ็ปผๅˆๅˆ†ๆž

ๆœ€ไฝณๅฎž่ทต

- ๅœจๅคšไธชๆ—ถ้—ดๆก†ๆžถไธŠไฝฟ็”จไปฅ่Žทๅพ—ๅ…ฑๆŒฏ
- ็ป“ๅˆๆˆไบค้‡ๅˆ†ๆžไปฅ่Žทๅพ—ๆ›ดๅฅฝ็š„ไฟกๅท่ดจ้‡
- ๅ…ณๆณจๅบๅˆ—็ ดๅไฝœไธบๆฝœๅœจๅ่ฝฌไฟกๅท
- ๆ นๆฎๅ›พ่กจ่ƒŒๆ™ฏ่ฐƒๆ•ด้€ๆ˜Žๅบฆ่ฎพ็ฝฎไปฅ่Žทๅพ—ๆœ€ไฝณๅฏ่งๆ€ง

ๆŠ€ๆœฏ่ง„ๆ ผ

- Pine Script็‰ˆๆœฌ๏ผšv6
- ่ฆ†็›–ๅ›พ่กจ๏ผšๆ˜ฏ๏ผˆๅœจไปทๆ ผๅ›พ่กจไธŠ็ป˜ๅˆถ๏ผ‰
- ๆœ€ๅคงๅฏน่ฑกๆ•ฐ๏ผš500ไธชๆ ‡็ญพใ€500ไธชๆก†ใ€500ๆก็บฟ
- ไฝœ่€…๏ผšWendellZhang
- ่ฎธๅฏ่ฏ๏ผšMozillaๅ…ฌๅ…ฑ่ฎธๅฏ่ฏ2.0

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.