OPEN-SOURCE SCRIPT
MARK Inside Bars

**Mother Bar Range — Inside Bar Sequence** is a simple price-action indicator designed to identify and highlight consecutive candles trading within the range of a Mother Bar.
Unlike traditional inside-bar indicators that compare each candle only to the candle immediately before it, this indicator tracks the **original Mother Bar's High and Low**.
Once an Inside Bar forms, the previous candle becomes the Mother Bar. Every following candle is highlighted as long as:
• Its High remains at or below the Mother Bar High
• Its Low remains at or above the Mother Bar Low
This makes it easy to identify extended periods of **price compression and consolidation**, even when there are multiple consecutive candles inside the same Mother Bar range.
The sequence ends when price trades outside the Mother Bar's range.
**Useful for identifying:**
• Inside Bar sequences
• Price compression
• Consolidation ranges
• Mother Bar structures
• Potential expansion/breakout setups
Works on all markets and timeframes.
Unlike traditional inside-bar indicators that compare each candle only to the candle immediately before it, this indicator tracks the **original Mother Bar's High and Low**.
Once an Inside Bar forms, the previous candle becomes the Mother Bar. Every following candle is highlighted as long as:
• Its High remains at or below the Mother Bar High
• Its Low remains at or above the Mother Bar Low
This makes it easy to identify extended periods of **price compression and consolidation**, even when there are multiple consecutive candles inside the same Mother Bar range.
The sequence ends when price trades outside the Mother Bar's range.
**Useful for identifying:**
• Inside Bar sequences
• Price compression
• Consolidation ranges
• Mother Bar structures
• Potential expansion/breakout setups
Works on all markets and timeframes.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.