OPEN-SOURCE SCRIPT
Mitigation Blocks — Lite (ICT) + Stats + Entry75

Mitigation Blocks — Lite (ICT) + Stats + Entry75
What it does
This indicator finds recent Mitigation Blocks (ICT-style) and draws a single active bullish and bearish block on the chart.
It also plots the 75% entry level for each active block and shows a compact performance HUD (“Отработано / Worked”) so you can quickly judge how well blocks have been reacting on the current symbol and timeframe.
Logic (brief)
Structure impulse
A new block is created when price breaks the last swing (pivot-based) with an optional ATR body filter.
After an upswing break → search the most recent bearish candle within a lookback window → its body defines the bullish block (top/bottom = max/min of that candle’s open/close).
After a downswing break → search the most recent bullish candle → defines the bearish block.
Touch & mitigation
First time price touches a block, the block is marked mitigated (border becomes dashed).
Entry line for that block is removed (no history clutter to the left).
75% entry levels
Long (bullish block): entry = top − 0.75 × (top − bottom) (deeper inside from the top).
Short (bearish block): entry = bottom + 0.75 × (top − bottom) (deeper inside from the bottom).
Lines are drawn only to the right (history on the left is hidden).
Stats (HUD)
The HUD shows Worked% per side: percentage of first touches that reached a simple target in the check window.
Current version uses a conservative proxy: success if, within the next bars, price moved away from the block by at least ~1×ATR (internally calculated) without first invalidating the block’s opposite boundary.
Values are accumulated while the script runs on the loaded chart range.
Inputs
Structure
Swing length (pivot) — pivot size to detect last swing.
Require minimum impulse / Min body × ATR / ATR length — filter for strong displacement bars.
Search last opposite candle (bars back) — lookback to find the candle that defines the block.
Style
Fill & border colors for bullish/bearish blocks.
Mitigated border color (dashed on first touch).
Entry 75% lines
Show 75% entry lines (on/off)
Colors and line width.
Autoscale
Optional hidden anchor plots for better autoscaling.
On-chart elements
Active bullish/bearish block (rectangle, extended right).
Dashed border once the block is mitigated (first touch).
75% entry line for each non-mitigated block (drawn only to the right; removed on mitigation).
HUD (top-right):
LONG | Worked: XX.X% | <entry price or “ожидаем”>
SHORT | Worked: XX.X% | <entry price or “ожидаем”>
If there is no active (non-mitigated) block on a side, the entry cell shows “ожидаем” (“waiting”).
How to read it
Trade from block to block: use the 75% line as a reference entry inside the zone; stops are commonly placed beyond the opposite side of the block.
Worked% helps compare symbols/timeframes: higher with a decent sample typically means more reliable reactions.
The indicator shows only the latest valid block per side to keep the chart clean.
Notes & tips
This is a discretionary tool intended to support ICT-style execution; it is not a strategy and does not place trades.
Try different timeframes. Many users prefer M5–H1 for entries and H4–D1 for context.
You can turn off entry lines if you only want the zones.
Because stats are computed on the visible history while the script runs, switching symbols/TFs will reset the counters.
Inputs (defaults)
Pivot length: 5
ATR length: 14
Min body × ATR: 1.0 (enable/disable filter)
Opposite candle lookback: 5
Entry 75% lines: ON
What it does
This indicator finds recent Mitigation Blocks (ICT-style) and draws a single active bullish and bearish block on the chart.
It also plots the 75% entry level for each active block and shows a compact performance HUD (“Отработано / Worked”) so you can quickly judge how well blocks have been reacting on the current symbol and timeframe.
Logic (brief)
Structure impulse
A new block is created when price breaks the last swing (pivot-based) with an optional ATR body filter.
After an upswing break → search the most recent bearish candle within a lookback window → its body defines the bullish block (top/bottom = max/min of that candle’s open/close).
After a downswing break → search the most recent bullish candle → defines the bearish block.
Touch & mitigation
First time price touches a block, the block is marked mitigated (border becomes dashed).
Entry line for that block is removed (no history clutter to the left).
75% entry levels
Long (bullish block): entry = top − 0.75 × (top − bottom) (deeper inside from the top).
Short (bearish block): entry = bottom + 0.75 × (top − bottom) (deeper inside from the bottom).
Lines are drawn only to the right (history on the left is hidden).
Stats (HUD)
The HUD shows Worked% per side: percentage of first touches that reached a simple target in the check window.
Current version uses a conservative proxy: success if, within the next bars, price moved away from the block by at least ~1×ATR (internally calculated) without first invalidating the block’s opposite boundary.
Values are accumulated while the script runs on the loaded chart range.
Inputs
Structure
Swing length (pivot) — pivot size to detect last swing.
Require minimum impulse / Min body × ATR / ATR length — filter for strong displacement bars.
Search last opposite candle (bars back) — lookback to find the candle that defines the block.
Style
Fill & border colors for bullish/bearish blocks.
Mitigated border color (dashed on first touch).
Entry 75% lines
Show 75% entry lines (on/off)
Colors and line width.
Autoscale
Optional hidden anchor plots for better autoscaling.
On-chart elements
Active bullish/bearish block (rectangle, extended right).
Dashed border once the block is mitigated (first touch).
75% entry line for each non-mitigated block (drawn only to the right; removed on mitigation).
HUD (top-right):
LONG | Worked: XX.X% | <entry price or “ожидаем”>
SHORT | Worked: XX.X% | <entry price or “ожидаем”>
If there is no active (non-mitigated) block on a side, the entry cell shows “ожидаем” (“waiting”).
How to read it
Trade from block to block: use the 75% line as a reference entry inside the zone; stops are commonly placed beyond the opposite side of the block.
Worked% helps compare symbols/timeframes: higher with a decent sample typically means more reliable reactions.
The indicator shows only the latest valid block per side to keep the chart clean.
Notes & tips
This is a discretionary tool intended to support ICT-style execution; it is not a strategy and does not place trades.
Try different timeframes. Many users prefer M5–H1 for entries and H4–D1 for context.
You can turn off entry lines if you only want the zones.
Because stats are computed on the visible history while the script runs, switching symbols/TFs will reset the counters.
Inputs (defaults)
Pivot length: 5
ATR length: 14
Min body × ATR: 1.0 (enable/disable filter)
Opposite candle lookback: 5
Entry 75% lines: ON
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.