PROTECTED SOURCE SCRIPT
BOS/CHoCH Market Structure with Order Blocks

CHoCH • BOS • Market Structure Suite with Institutional Order Blocks (Pine Script v6)
This advanced market-structure indicator is designed for traders who rely on clean, rule-based price action. It automatically identifies structural shifts, confirms major trend transitions, and highlights institutional points of interest such as order blocks. Built with precision and clarity, the tool provides multi-layered insight without cluttering the chart.
Key Features
✔ Break of Structure (BOS) Detection
Detects bullish and bearish BOS with strict candle-close confirmation.
Draws colored lines:
Green BOS line when price closes above the previous high.
Red BOS line when price closes below the previous low.
BOS lines automatically label themselves for quick visual reference.
✔ Change of Character (CHoCH)
Identifies the earliest sign of a potential trend reversal.
Prints green CHoCH for bullish shifts and red CHoCH for bearish shifts.
Helps traders anticipate new market phases with precision.
✔ Swing Structure Labels (HH, HL, LH, LL)
Automatically marks all confirmed swing points:
HH, HL (green) for bullish structure
LH, LL (red) for bearish structure
Uses tiny, clean labels to keep the chart readable.
✔ Institutional Order Blocks (Bullish & Bearish)
Identifies valid order blocks using institutional logic.
Bullish Order Blocks: highlights the last bearish candle before bullish displacement.
Bearish Order Blocks: highlights the last bullish candle before bearish displacement.
Draws automatic extended boxes:
Red boxes for bullish order blocks
Blue boxes for bearish order blocks
Boxes extend to the right until mitigation occurs.
✔ Timeframe Filtering for Order Blocks
Order blocks only appear on higher timeframes (1H → Monthly), reducing noise.
Automatically hides order-block zones on lower timeframes.
✔ Fully Customizable Settings
Enable or disable BOS, CHoCH, swing labels, or order blocks.
Adjust colors, line width, font size, transparency, and extension options.
Set the number of order block boxes to keep on screen.
Clean user interface with intuitive controls.
✔ Built for Reliability
Uses defensive coding to prevent runtime errors.
Efficient pivot-handling, minimal label clutter, and safe object management.
Suitable for intraday, swing, and smart money concept traders.
This advanced market-structure indicator is designed for traders who rely on clean, rule-based price action. It automatically identifies structural shifts, confirms major trend transitions, and highlights institutional points of interest such as order blocks. Built with precision and clarity, the tool provides multi-layered insight without cluttering the chart.
Key Features
✔ Break of Structure (BOS) Detection
Detects bullish and bearish BOS with strict candle-close confirmation.
Draws colored lines:
Green BOS line when price closes above the previous high.
Red BOS line when price closes below the previous low.
BOS lines automatically label themselves for quick visual reference.
✔ Change of Character (CHoCH)
Identifies the earliest sign of a potential trend reversal.
Prints green CHoCH for bullish shifts and red CHoCH for bearish shifts.
Helps traders anticipate new market phases with precision.
✔ Swing Structure Labels (HH, HL, LH, LL)
Automatically marks all confirmed swing points:
HH, HL (green) for bullish structure
LH, LL (red) for bearish structure
Uses tiny, clean labels to keep the chart readable.
✔ Institutional Order Blocks (Bullish & Bearish)
Identifies valid order blocks using institutional logic.
Bullish Order Blocks: highlights the last bearish candle before bullish displacement.
Bearish Order Blocks: highlights the last bullish candle before bearish displacement.
Draws automatic extended boxes:
Red boxes for bullish order blocks
Blue boxes for bearish order blocks
Boxes extend to the right until mitigation occurs.
✔ Timeframe Filtering for Order Blocks
Order blocks only appear on higher timeframes (1H → Monthly), reducing noise.
Automatically hides order-block zones on lower timeframes.
✔ Fully Customizable Settings
Enable or disable BOS, CHoCH, swing labels, or order blocks.
Adjust colors, line width, font size, transparency, and extension options.
Set the number of order block boxes to keep on screen.
Clean user interface with intuitive controls.
✔ Built for Reliability
Uses defensive coding to prevent runtime errors.
Efficient pivot-handling, minimal label clutter, and safe object management.
Suitable for intraday, swing, and smart money concept traders.
نص برمجي محمي
تم نشر هذا النص البرمجي كمصدر مغلق. ومع ذلك، يمكنك استخدامه بحرية ودون أي قيود - تعرف على المزيد هنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي محمي
تم نشر هذا النص البرمجي كمصدر مغلق. ومع ذلك، يمكنك استخدامه بحرية ودون أي قيود - تعرف على المزيد هنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.