PROTECTED SOURCE SCRIPT
Order Blocks (HuntPip)

Order Blocks (HuntsPip) detects and displays order block zones on the chart timeframe, validated by breaks of market structure, with configurable mitigation tracking. It helps traders pinpoint high-probability institutional supply and demand zones by identifying the last opposing candle before a significant price move that breaks structure, automatically tracking whether each zone has been mitigated or remains active for potential trade entries.
────────────────────
█ CONCEPTS
An order block is a price action concept referring to the last opposing candle before a strong directional move that breaks market structure. In Smart Money Concepts (SMC) analysis, these candles are interpreted as areas where significant positioning may have occurred. When price later returns to these zones, some traders watch for potential reactions.
A bullish order block is typically identified as the last bearish candle before an upward break of structure, while a bearish order block is the last bullish candle before a downward break. The idea is that these zones may act as areas of interest when price revisits them. Mitigation refers to the process of price returning to an order block zone - once price has interacted with the zone to a certain degree, some traders consider the order block "used up" and no longer active.
────────────────────
█ WHAT IT DOES
This tool identifies order block zones on the chart timeframe by tracking market structure internally and detecting the relevant candle before each break of structure. Each order block is drawn as a colored box that extends forward from the candle where it formed. Bullish and bearish order blocks use separate colors for quick identification, and an optional label displays the timeframe and zone type.
The tool actively tracks mitigation. When price returns to an order block zone and meets the selected mitigation condition, the zone changes color to indicate it has been mitigated and stops extending forward. Mitigated zones can optionally remain on the chart for reference or be removed entirely. The indicator manages display limits by showing the order blocks closest to the current price and removing the farthest ones when the maximum count is reached.
────────────────────
█ FEATURES AND USAGE
CHART (TIMEFRAME) ORDER BLOCK
This tool works on any instrument and any timeframe. Traders who prefer fewer, more selective zones can use Conservative structure detection with a strict mitigation condition like Close Outside, while those who want to see more zones can use Aggressive detection with Wick Inside mitigation. Order blocks are best used as confluence with other analysis - such as premium/discount levels, session ranges, or trend context - rather than as standalone entry triggers.
────────────────────
█ CONCEPTS
An order block is a price action concept referring to the last opposing candle before a strong directional move that breaks market structure. In Smart Money Concepts (SMC) analysis, these candles are interpreted as areas where significant positioning may have occurred. When price later returns to these zones, some traders watch for potential reactions.
A bullish order block is typically identified as the last bearish candle before an upward break of structure, while a bearish order block is the last bullish candle before a downward break. The idea is that these zones may act as areas of interest when price revisits them. Mitigation refers to the process of price returning to an order block zone - once price has interacted with the zone to a certain degree, some traders consider the order block "used up" and no longer active.
────────────────────
█ WHAT IT DOES
This tool identifies order block zones on the chart timeframe by tracking market structure internally and detecting the relevant candle before each break of structure. Each order block is drawn as a colored box that extends forward from the candle where it formed. Bullish and bearish order blocks use separate colors for quick identification, and an optional label displays the timeframe and zone type.
The tool actively tracks mitigation. When price returns to an order block zone and meets the selected mitigation condition, the zone changes color to indicate it has been mitigated and stops extending forward. Mitigated zones can optionally remain on the chart for reference or be removed entirely. The indicator manages display limits by showing the order blocks closest to the current price and removing the farthest ones when the maximum count is reached.
────────────────────
█ FEATURES AND USAGE
CHART (TIMEFRAME) ORDER BLOCK
- LTF MS Type - Controls how strictly a break of structure is confirmed before validating an order block.
- Conservative - Requires a candle close beyond the swing level.
- Aggressive - Triggers on any high or low beyond the swing level, including wicks. - OB Type - Determines the boundaries of each order block zone.
- Wick - The zone spans from the candle's high to its low.
- Body - The zone spans from the candle's open to its close. - Mitigate OB when - Toggles mitigation tracking on or off. When enabled, the dropdown selects the condition that must be met for a zone to be considered mitigated.
- Close Outside - Price closes beyond the far edge of the zone.
- Wick Outside - Price wicks beyond the far edge of the zone.
- Close > 50% - Price closes past the midpoint of the zone.
- Wick > 50% - Price wicks past the midpoint of the zone.
- Close Inside - Price closes inside the zone.
- Wick Inside - Price wicks into the zone. - Show Label - Toggles the timeframe and zone type label on each order block box.
- Colors - Three color pickers controlling the bullish, bearish, and mitigated zone colors.
- Display maximum of - Controls how many active order block zones are shown at once. Range: 1-50. The indicator prioritizes zones closest to the current price.
- Max Mitigated - Controls how many mitigated zones remain visible on the chart. Range: 1-10. Older mitigated zones are removed first.
- Extend forward by - Controls how far each active zone box extends to the right of the current bar. Range: 1-200 bars.
This tool works on any instrument and any timeframe. Traders who prefer fewer, more selective zones can use Conservative structure detection with a strict mitigation condition like Close Outside, while those who want to see more zones can use Aggressive detection with Wick Inside mitigation. Order blocks are best used as confluence with other analysis - such as premium/discount levels, session ranges, or trend context - rather than as standalone entry triggers.
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Można z tego korzystać swobodnie i bez żadnych ograniczeń — więcej informacji znajduje się tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Można z tego korzystać swobodnie i bez żadnych ograniczeń — więcej informacji znajduje się tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.