Fibo Box Breakout Indicator: A Range And Five Levels

Written by Dominic Walsh · Published · Last updated

The fibo box breakout indicator draws the range before the break. A swing high and a swing low inside `SwingLookback` `50` bars form a box. Five fibonacci levels split it, and a close past either edge earns a mark.

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 2: Fibo Box BUY, Fibo Box SELL
Alerts popup, push notification, email, sound
Inputs 14

What the Fibo Box Breakout Indicator draws on the chart

A slate blue rectangle covers the swing range.

Goldenrod lines split it at 0.236, 0.382, 0.5, 0.618 and 0.786.

`Fibo Box BUY` uses arrow 233 and `Fibo Box SELL` uses 234.

`ShowBox` and `ShowFibLevels` switch either layer off.

  • Fibo Box BUY: arrow, lime, width 2, arrow code 233
  • Fibo Box SELL: arrow, red, width 2, arrow code 234
Fibo box breakout indicator range box, ratio lines and arrows on EURUSD H1.
Fibo box breakout indicator range box, ratio lines and arrows on EURUSD H1.

How the Fibo Box Breakout Indicator calculates its values

Pivots build the box

`PivotStrength` `3` confirms a swing with three bars either side. The code searches `SwingLookback` `50` bars for the highest and lowest of those pivots. Their times set where the box starts and ends.

Five levels split the range

Each level takes the box low and adds a share of the range. The 0.5 line sits in the middle while the rest fall where the ratios put them. All five redraw when the box changes.

A close decides the break

The current close has to sit beyond an edge while the previous one sat inside. Using closes rather than wicks cuts the number of marks, and it also delays each one by a bar.

How to read the signals

The box shows the range that a break has to leave.

Levels inside it are references, and price often stalls near the 0.618 line.

A mark means one closed bar finished outside an edge.

`TopColor` and `BottomColor` separate the two sides at a glance.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

`EnableAlerts` covers the break messages and starts true, with `EnablePopup` showing the dialog. The remaining routes wait for you: `EnablePushNotify` for a phone, `EnableEmail` for mail, `EnableSound` for the clip in `SoundFile`. One message per closed bar.

Every Fibo Box Breakout Indicator input

Core settings

Setting What it does Default
SwingLookback bars on each side that define a swing pivot. Bars searched for the two swing pivots, default `50`. 50
PivotStrength fractal strength (bars left/right). Bars either side that confirm a pivot, default `3`. 3

Display settings

Setting What it does Default
ShowFibLevels draw 0.236/0.382/0.5/0.618/0.786. Draw the five ratio lines inside the box, default `true`. on
ShowBox draw the range box rectangle. Draw the range rectangle itself, default `true`. on
BoxColor Rectangle colour, default `clrSlateBlue`. slate blue
FibColor Ratio line colour, default `clrGoldenrod`. goldenrod
TopColor Upper edge colour, default `clrLime`. lime
BottomColor Lower edge colour, default `clrRed`. red

Alert settings

Setting What it does Default
EnableAlerts (see inputs panel) on
EnablePopup (see inputs panel) on
EnablePushNotify (see inputs panel) off
EnableEmail (see inputs panel) off
EnableSound (see inputs panel) off
SoundFile (see inputs panel) alert.wav
Fibo box breakout indicator inputs panel with SwingLookback, PivotStrength and ShowBox.
Fibo box breakout indicator inputs panel with SwingLookback, PivotStrength and ShowBox.

Settings that fit your chart

A fifty-bar search needs a chart that holds a range. EURUSD H1 is the reference chart, where `SwingLookback` `50` covers two days. On M5 the box redraws several times a session. H4 charts hold one box for weeks.

When the Fibo Box Breakout Indicator fails

A three-bar pivot confirms late, so the box updates after the fact.

Closes ignore a wick that pierced an edge and came straight back.

The five levels are drawn references and take no part in the break test.

Copy the compiled Fibo Box Breakout 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.

Related on forexmt4systems.com: London Session Breakout Strategy.

Background reading on the method behind the Fibo Box Breakout Indicator: G10 currencies on Wikipedia, Stockcharts Record High Percent at StockCharts ChartSchool.

Download the Fibo Box Breakout Indicator for MT4 and MT5

The zip holds the compiled Fibo Box Breakout 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.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

What does SwingLookback 50 search?

Fifty bars of history for the highest and lowest confirmed pivot. Those two set the box. Shorten it and the box tracks recent price closely. Lengthen it and the range stays put through longer stretches of movement.

How strict is PivotStrength at 3?

Mild. A bar only has to beat three neighbours on each side, so plenty of small turns qualify. That keeps the box responsive, at the cost of letting minor swings redefine an edge. Raise it for a steadier box.

Why does Fibo Box BUY need a close?

Because a wick beyond an edge often retreats within the same bar. Waiting for a close filters those out. The trade off is one bar of delay on every mark, and a move that runs hard leaves you further from the edge.

What does ShowFibLevels turn off?

The five goldenrod ratio lines drawn inside the box, at 0.236 through 0.786. Switching it off leaves the rectangle and the arrows in place. Nothing about the break test changes, since the levels never fed it.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Fibo Box Breakout Indicator as one input. Always backtest before trading live.

Category: this is part of our Signal and Forecast collection. Also, truly, browse more Signal and Forecast for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

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.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment