The market structure breaker indicator draws a line most structure tools blur. A break in the direction the market was already going extends the trend. A break the other way changes its character. Two colour pairs keep those apart, so the chart tells you which one happened.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Main price chart |
| Plots | 4: BOS Buy, BOS Sell, CHoCH Buy, CHoCH Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 15 |
What the Market Structure Breaker Indicator draws on the chart
BOS Buy and BOS Sell are lime and red, marking a break that continues.
CHoCH Buy and CHoCH Sell are aqua and magenta, marking a change of character.
OBJ_TREND lines join the broken level when `ShowStructureLines` is on.
OBJ_TEXT labels name each swing when `ShowLabels` is on.
- BOS Buy: arrow, lime, width 2, arrow code 233
- BOS Sell: arrow, red, width 2, arrow code 234
- CHoCH Buy: arrow, aqua, width 2, arrow code 233
- CHoCH Sell: arrow, magenta, width 2, arrow code 234

How the Market Structure Breaker Indicator calculates its values
Tracking the swings
IsSwingHigh and IsSwingLow confirm a pivot with `PivotStrength` `3` bars on each side. The code keeps a rolling list and shifts older entries down as new ones arrive. `StructureLookback` `50` bounds the search.
Separating the two events
Breaking a swing in the direction of the previous structure fills the BOS buffers. Breaking one against it fills the CHoCH buffers. The same price break can be either, depending on what came before.
Capping the drawing
`MaxObjects` `200` limits how many structure lines and labels stay on the chart. Both events are common. Without a cap a long history would leave the terminal drawing thousands of objects.
How to read the signals
Lime and red mean the trend just extended itself.
Aqua and magenta mean the market broke the other way. That is the warning.
The first change of character after a long run is the one worth noticing.
Labels show the swing sequence behind each judgement.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
`EnableAlerts` starts on with `EnablePopup` and `EnableSound` both true, while `EnablePushNotify` and `EnableEmail` begin false. `SoundFile` picks the clip. Events confirm on closed bars, one message per bar.
Every Market Structure Breaker Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
StructureLookback |
Swing detection window (bars each side). Bars the swing search covers, default `50`. | 50 |
PivotStrength |
Bars left/right to confirm a pivot. Bars each side confirming a pivot, default `3`. | 3 |
MaxObjects |
Cap drawn structure objects. Cap on drawn structure objects, default `200`. | 200 |
Display settings
| Setting | What it does | Default |
|---|---|---|
ShowLabels |
Draw HH/HL/LH/LL text labels. Draws the swing text labels, default `true`. | on |
ShowStructureLines |
Draw BOS/CHoCH lines. Draws lines at the broken levels, default `true`. | on |
BullishColor |
Bullish colour, default lime. | lime |
BearishColor |
Bearish colour, default red. | red |
NeutralColor |
Neutral colour, default silver. | silver |
ArrowOffsetPoints |
Arrow offset above/below bar. Mark distance from the bar in points, default `20`. | 20 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Master switch for the break event alerts, default `true`. | on |
EnablePopup |
Terminal dialog on a break event, default `true`. | on |
EnablePushNotify |
Phone push on a break event, default `false`. | off |
EnableEmail |
Mail delivery on a break event, default `false`. | off |
EnableSound |
Sound playback on a break event, default `true`. | on |
SoundFile |
Wav clip for the break alert, default `alert.wav`. | alert.wav |

Settings that fit your chart
Structure work needs swings large enough to read. EURUSD H1 is the reference chart, where `PivotStrength` at `3` picks turns lasting a few hours. On M5 both event types fire constantly. On H4 a change of character is rare and usually matters.
When the Market Structure Breaker Indicator fails
A three-bar pivot is small, so plenty of events describe noise.
The tool decides continuation against change of character mechanically, from the previous structure alone.
Both event types confirm three bars late, because the pivot has to confirm first.
Copy the compiled Market Structure Breaker Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Download the Market Structure Breaker Indicator for MT4 and MT5
The zip holds the compiled Market Structure Breaker Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
When does CHoCH Buy print instead of BOS Buy?
When the break goes against the previous structure. Breaking a swing high during a run of higher highs extends the trend, so lime takes it. Breaking one after a run of lower highs changes character, and aqua takes it instead.
Why does PivotStrength delay every event?
Because a swing needs three newer bars to close without beating it. On EURUSD H1 that is three hours. Every arrow inherits the delay, since the break gets measured against a confirmed swing.
What do the ShowStructureLines objects add?
A line at the level that broke. Without it an arrow tells you an event happened, but not which swing gave way. Turn them off on a busy chart. `MaxObjects` `200` caps the count either way.
How many bars does StructureLookback cover?
Fifty, which on EURUSD H1 is two days. That bounds which swings a break can target. Widening it lets older structure count, and that usually shifts more events from continuation into change of character.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Market Structure Breaker Indicator as one input. Always backtest before trading live.
Category: this is part of our Smart Money collection. Browse more Smart Money for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- The core method is documented in Modigliani risk-adjusted performance on Wikipedia.
- Additional market context is at Bob Farrells 10 Rules at StockCharts ChartSchool.
