OPEN-SOURCE SCRIPT
Multi-Timeframe Order Blocks

Designed to identify and visualize key supply and demand zones based on order block theory across multiple timeframes. The indicator detects order blocks by analyzing sequential candle patterns and price movement thresholds to highlight potential reversal or continuation zones where institutional buying or selling activity may have occurred.
The indicator works by scanning for clusters of consecutive bullish or bearish candles followed by a significant price move, which signals the formation of an order block. It then plots these zones as colored boxes on the chart—green for demand (bullish order blocks) and red for supply (bearish order blocks). The zones can be based on candle bodies or wicks, depending on user preference, and the indicator supports multi-timeframe analysis by allowing optional higher timeframe inputs.
How It Works:
Sequential Candle Detection: The indicator looks for a specified number of consecutive bullish or bearish candles (configurable by the user) to identify potential order blocks.
Price Movement Threshold: It checks if the price movement after the order block formation exceeds a user-defined percentage threshold, ensuring only significant zones are marked.
Zone Plotting: Once an order block is confirmed, the indicator draws a supply or demand zone as a box on the chart, using either candle bodies or wicks for zone boundaries.
Multi-Timeframe Support: Users can optionally specify higher timeframes to incorporate broader market context, enhancing the reliability of the zones.
Zone Management: The indicator limits the number of zones displayed to avoid clutter, automatically removing the oldest zones when the maximum count is exceeded.
How to Interpret:
Demand Zones (Green Boxes): These represent areas where buying pressure was strong enough to create a bullish order block. Price often finds support here, making these zones potential entry points for long trades or areas to watch for price bounces.
Supply Zones (Red Boxes): These indicate areas of strong selling pressure forming bearish order blocks. Price may face resistance in these zones, which can be used as potential exit points for longs or entry points for shorts.
Multi-Timeframe Confirmation: Zones identified on higher timeframes tend to be stronger and more reliable. Use the optional higher timeframe inputs to align your trades with broader market trends.
Use with Other Indicators: Combine order block zones with volume, momentum, or trend indicators to improve trade confirmation and risk management.
Zone Breaks: A decisive break and close beyond a supply or demand zone may signal a shift in market sentiment and potential trend continuation or reversal.
Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute financial advice. Trading involves significant risk, and it is possible to lose more than your initial investment. Users should conduct their own research and consider their financial situation carefully before making any trading decisions. The developer and publisher of this indicator are not responsible for any trading losses or damages incurred. Always use proper risk management and consult with a licensed financial advisor if needed.
The indicator works by scanning for clusters of consecutive bullish or bearish candles followed by a significant price move, which signals the formation of an order block. It then plots these zones as colored boxes on the chart—green for demand (bullish order blocks) and red for supply (bearish order blocks). The zones can be based on candle bodies or wicks, depending on user preference, and the indicator supports multi-timeframe analysis by allowing optional higher timeframe inputs.
How It Works:
Sequential Candle Detection: The indicator looks for a specified number of consecutive bullish or bearish candles (configurable by the user) to identify potential order blocks.
Price Movement Threshold: It checks if the price movement after the order block formation exceeds a user-defined percentage threshold, ensuring only significant zones are marked.
Zone Plotting: Once an order block is confirmed, the indicator draws a supply or demand zone as a box on the chart, using either candle bodies or wicks for zone boundaries.
Multi-Timeframe Support: Users can optionally specify higher timeframes to incorporate broader market context, enhancing the reliability of the zones.
Zone Management: The indicator limits the number of zones displayed to avoid clutter, automatically removing the oldest zones when the maximum count is exceeded.
How to Interpret:
Demand Zones (Green Boxes): These represent areas where buying pressure was strong enough to create a bullish order block. Price often finds support here, making these zones potential entry points for long trades or areas to watch for price bounces.
Supply Zones (Red Boxes): These indicate areas of strong selling pressure forming bearish order blocks. Price may face resistance in these zones, which can be used as potential exit points for longs or entry points for shorts.
Multi-Timeframe Confirmation: Zones identified on higher timeframes tend to be stronger and more reliable. Use the optional higher timeframe inputs to align your trades with broader market trends.
Use with Other Indicators: Combine order block zones with volume, momentum, or trend indicators to improve trade confirmation and risk management.
Zone Breaks: A decisive break and close beyond a supply or demand zone may signal a shift in market sentiment and potential trend continuation or reversal.
Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute financial advice. Trading involves significant risk, and it is possible to lose more than your initial investment. Users should conduct their own research and consider their financial situation carefully before making any trading decisions. The developer and publisher of this indicator are not responsible for any trading losses or damages incurred. Always use proper risk management and consult with a licensed financial advisor if needed.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.