Mitigation Block Sentinel TradingView Indicator

A mitigation block is the last opposite-close candle before a strong displacement leaves an area. Also, mitigation Block Sentinel, a free mitigation block indicator TradingView traders can drop on any chart, finds those candles for you. It waits for a body of at least 1.0 x ATR that also breaks the 10-bar structure high or low. Then it scans back up to 6 bars, marks the origin candle as a zone, and arms a directional bias.

It is free and open source. Indeed, you can add it to any chart from the Mitigation Block Sentinel script page on TradingView, and the full Pine source is published there for you to read.

What Mitigation Block Sentinel plots on the price chart

The script draws one box per side. Still, a bull block box spans the origin candle’s high and low, tinted with your buy color and extended 20 bars to the right. Bear blocks mirror that. Thus, signals print as squares below or above the bar, each stamped MBS, with two wider glow layers behind them. The script also colors the impulse bar itself and tints the chart background while a bias holds. Hence, a top-right dashboard lists bias, both block ranges, blocks found, ATR, position state and bars since the last signal.

How Mitigation Block Sentinel is built

Finding the block

The hunt starts with an impulse. On every bar the script measures the body as the absolute distance between open and close. It compares that body to ATR over 14 bars. Next, a bullish impulse needs three things at once. The body must reach 1.0 x ATR. The bar must close up. And the close must clear the highest high of the prior 10 bars. Then, the bearish version flips each test.

Once an impulse confirms, the script walks back up to 6 bars. Yet, it stops at the first down-close candle for a bull setup, or the first up-close candle for a bear setup. That candle’s high and low become the block zone. The zone then sits armed. If price later trades back into it, within a buffer of 0.10 x ATR, the script marks the block as retested.

Timing the entry

A fresh impulse also sets a bias. Truly, bullish impulses set the bias long. Bearish ones set it short. Plainly, the bias then holds until the opposite impulse appears.

The default mode times entries with a 9-period EMA. While the bias is long, a close crossing above that EMA fires a buy. While the bias is short, a close crossing below it fires a sell. Also, turn on Retest-Only Mode and the EMA drops out. Signals then require price to trade back into the block zone itself. Indeed, that mode fires far less often.

Three gates sit in front of every arrow. Still, the bar must close first, because the code checks barstate.isconfirmed. At least 5 bars must have passed since the previous signal. Thus, and the internal position state must allow it, so buys and sells alternate rather than stack. An optional session window can also mute signals outside your chosen hours.

How to read the signals

Read the box first. Hence, it shows the price band the algorithm cares about. A bull block marks where sellers got absorbed before the market ran up. Next, so its lower edge is the level that matters most for risk.

Then check the dashboard. Then, bias tells you which side the script currently hunts. Position shows whether it counts you as long, short or flat. Yet, last Signal gives the bar count since the previous arrow, which helps you judge how fresh a setup is.

Arrows land at the open of the next candle, because the code waits for the bar to close. Zones behave differently. Boxes and the background tint update on the live bar, so a box can appear mid-candle and then vanish if the impulse fades. Truly, judge blocks on closed bars only.

Every Mitigation Block Sentinel setting explained

The script exposes 16 inputs, grouped in the settings panel exactly as shown below. Defaults are the published values.

Block

SettingWhat it doesDefaultRange
Structure LookbackBars used for the high/low the impulse must break.103 to 60
Impulse Body x ATRThe launch candle body must be at least k x ATR.1.00.3 to 5.0
Block Scan BackBars scanned back from the impulse to find the origin block candle.61 to 20
Retest Buffer x ATRSets the retest buffer x atr used in the calculation.0.100.0 to 2.0
ATR LengthSets the atr length used in the calculation.145 to 50

Signal Logic

SettingWhat it doesDefaultRange
Entry Reclaim EMAAfter a block forms, a close-cross of this EMA in the block direction times the entry.92 to 50
Retest-Only ModeOn = fire strictly on the block retest (rarer, classic). Off = EMA reclaim inside the active block bias (more signals).offon / off
Cooldown BarsSets the cooldown bars used in the calculation.51 to 40

Filters

SettingWhat it doesDefaultRange
Restrict to SessionToggles restrict to session on the chart.offon / off
Session WindowControls session window.0000-2400

Visual

SettingWhat it doesDefaultRange
Show Block ZonesToggles show block zones on the chart.onon / off
Show DashboardToggles show dashboard on the chart.onon / off
Show 3-Layer GlowToggles show 3-layer glow on the chart.onon / off
Buy ColorColour used for buy color.#3ddc97
Sell ColorColour used for sell color.#f7768e
Dashboard BGColour used for dashboard bg.color.new(#071a14, 14)

Alerts built into Mitigation Block Sentinel

The script ships 15 alert conditions. Plainly, open the alert dialog on the chart, pick the indicator as the condition source, then choose the event you want. Alerts fire on the close of the bar, so they follow the same confirmed-bar rule the on-chart signals use.

  • MBS Buy
  • MBS Sell
  • MBS Any Signal
  • MBS Bull Block
  • MBS Bear Block
  • MBS Bull Retest
  • MBS Bear Retest
  • MBS Any Block
  • MBS EMA Up
  • MBS EMA Down
  • MBS Bias Bull
  • MBS Bias Bear

Other markets and timeframes

Every threshold scales with the instrument. Also, the script measures body size against ATR, sets the retest buffer as a fraction of ATR, and defines structure with a bar count rather than a price distance. So the defaults carry over to gold, indices, crypto and stocks without retuning. Indeed, the session filter is the one forex-flavoured input, and it ships switched off. On very fast charts, raise the cooldown above 5 bars so arrows spread further apart.

Limitations worth knowing

The script never invalidates a block. Still, a zone stays on the chart once it forms, and the bias holds until an opposite impulse arrives. Price can close straight through a bull block while the dashboard still reads BULL BLOCK. You supply that judgement yourself.

Only one box per side survives. Thus, a new bull impulse deletes the previous bull box. So you cannot study a stack of historic zones on the chart, and older blocks leave no trace.

In default mode the entry comes from an EMA cross, not from the block. Hence, that cross can happen far from the zone. For the strict textbook behaviour, switch on Retest-Only Mode and accept far fewer signals. Next, the tool also carries no stop, no target and no position sizing.

Get Mitigation Block Sentinel on TradingView

Open Mitigation Block Sentinel on TradingView

If you also trade MetaTrader, the MT4 and MT5 indicator library is available below.

Get the complete indicator library

One email unlocks the full MT4 and MT5 indicator library. Then, this TradingView script stays free on TradingView – the button above adds it to your chart.

Using it alongside MetaTrader

Adding a script on TradingView takes one click, so there is no install step here. Yet, if you want the same idea on MetaTrader, the MT4 and MT5 indicator installation guide walks through copying files into the data folder and attaching them to a chart. You can also browse the full MetaTrader indicator library, the MT4 indicators section, or the other free TradingView scripts published on this profile. For related chart tools see the MT5 indicators section and the forex trading strategies guides.

External references

Frequently asked questions

Does Mitigation Block Sentinel repaint?

The arrows do not. Truly, every signal is gated on barstate.isconfirmed, so it prints after the bar closes and then stays put. Zones work differently. Plainly, boxes and the bias tint redraw on the live bar, so they can shift before that bar closes.

What is a mitigation block?

It is the last opposite-close candle before a strong move away from an area. Also, traders read it as the spot where trapped positions got mitigated. This script defines it mechanically: the nearest down-close candle within 6 bars before a bullish impulse, or the nearest up-close candle before a bearish one.

How does this differ from an order block tool?

The gate does the work. Indeed, here a candle only counts if the move after it carries a body of at least 1.0 x ATR and breaks the 10-bar high or low. Many order block scripts mark any opposite candle before a rise. Still, the ATR and structure tests cut the count sharply.

Why did a signal fire away from the block?

You are running the default mode. Thus, it fires on a 9-EMA reclaim in the direction of the active bias, which can happen well above or below the zone. Switch on Retest-Only Mode if you want signals that need the zone itself.

How much should I rely on this indicator?

Treat it as one input, not a decision. Hence, it is a chart analysis tool, not trading advice. Test it on your own markets and timeframes before relying on it. Results are not guaranteed; past performance is not indicative of future results.

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

Leave a Comment