OPEN-SOURCE SCRIPT

Chained Inside Bars

تم تحديثه
This script identifies consecutive inside bars by referencing only the most recent non-inside bar, so it avoids excessive lookback. An “inside” bar means its high is lower than the reference bar’s high, and its low is higher than the reference bar’s low. If the current bar is inside, it’s colored white; once price breaks outside, the script updates that new bar as the next reference.

Key Points
• Bars are compared against the last non-inside bar, chaining consecutive inside bars off that same reference bar.
• Inside bars are highlighted in white (non-inside bars retain default chart colors).
• Includes an alert condition for when a new inside bar forms.
• Prevents large dynamic indexing, making it more stable and efficient.

Use this indicator to quickly spot consecutive inside-bar formations without needing to track every single bar-to-bar relationship.
ملاحظات الأخبار
This script identifies consecutive inside bars by referencing only the most recent non-inside bar, so it avoids excessive lookback. An “inside” bar means its high is lower than the reference bar’s high, and its low is higher than the reference bar’s low. If the current bar is inside, it’s colored white; once price breaks outside, the script updates that new bar as the next reference.

Key Points
• Bars are compared against the last non-inside bar, chaining consecutive inside bars off that same reference bar.
• Inside bars are highlighted in white (non-inside bars retain default chart colors).
• Includes an alert condition for when a new inside bar forms.
• Prevents large dynamic indexing, making it more stable and efficient.

Use this indicator to quickly spot consecutive inside-bar formations without needing to track every single bar-to-bar relationship.

=== Update 2025/01/20 ===
This “Chained Inside Bars” indicator prevents abnormally large (outlier) bars from becoming the reference bar and trapping all future bars inside their range. It uses a user-configurable average range length and range multiplier to identify when a bar is “too big.” Such huge bars are automatically skipped, so the script can properly detect normal inside-bar formations.
BARBARSCandlestick analysisHigh-Low IndexsmartmoneyTrend Analysis

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

إخلاء المسؤولية