The double fibonacci indicator projects both directions at once. A swing high and a swing low inside `InpSwingBars` `20` set the range. Five extension levels then reach above the high while five reach below the low.
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 | 12: Ext +1.272, Ext +1.414, Ext +1.618, Ext +2.000, Ext +2.618, Ext -1.272, Ext -1.414, Ext -1.618, Ext -2.000, Ext -2.618, Buy, Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 7 |
What the Double Fibonacci Indicator draws on the chart
Five lines rise above the swing high at 1.272, 1.414, 1.618, 2.000 and 2.618.
Five more drop below the swing low at the same ratios.
Colour runs from aqua to purple going up, and from salmon to firebrick going down.
A lime `Buy` arrow and a red `Sell` arrow mark the trigger bars.
- Ext +1.272: line, aqua, width 1
- Ext +1.414: line, deep sky blue, width 1
- Ext +1.618: line, dodger blue, width 2
- Ext +2.000: line, royal blue, width 1
- Ext +2.618: line, medium purple, width 2
- Ext -1.272: line, light salmon, width 1
- Ext -1.414: line, salmon, width 1
- Ext -1.618: line, tomato, width 2
- Ext -2.000: line, crimson, width 1
- Ext -2.618: line, fire brick, width 2
- Buy: arrow, lime, width 3, arrow code 233
- Sell: arrow, red, width 3, arrow code 234

How the Double Fibonacci Indicator calculates its values
The range comes first
The code scans `InpSwingBars` `20` bars for the highest high and the lowest low. Subtracting one from the other gives the range every level is built from.
Extensions project outward
Each level takes the swing edge and adds the range times the ratio minus one. So 1.618 sits a little over six tenths of a range beyond the high. The down side mirrors that arithmetic below the low.
Triggers use the close
A signal compares the current close against the previous one and against a trigger just outside the range. Arrows sit a small distance from the candle, scaled by how wide the range is in points.
How to read the signals
Levels move whenever a new extreme enters the twenty-bar window.
The near levels at 1.272 and 1.414 sit close to the range edge.
Anything past 2.000 is a long way out on most charts.
Both sides draw at all times, so the chart shows targets either way.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
The switches here carry an `Inp` prefix. `InpEnableAlerts` gates the set and `InpEnablePopup` shows the terminal dialog, both true out of the box. `InpEnablePush`, `InpEnableEmail` and `InpEnableSound` start false, with `InpSoundFile` naming the clip.
Every Double Fibonacci Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
InpSwingBars |
Swing lookback bars. Bars scanned for the swing high and swing low, default `20`. | 20 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
InpEnableAlerts |
Enable alerts. Gate for the alert routes below, default `true`. | on |
InpEnablePopup |
Popup alerts. MetaTrader dialog when a trigger prints, default `true`. | on |
InpEnablePush |
Push notifications. Alert to the mobile app when a trigger prints, default `false`. | off |
InpEnableEmail |
Email alerts. Email when a trigger prints, default `false`. | off |
InpEnableSound |
Sound alerts. Audio cue when a trigger prints, default `false`. | off |
InpSoundFile |
Sound file. File the audio cue uses, default `”alert.wav”`. | alert.wav |

Settings that fit your chart
Projection levels need a range with two clear edges. EURUSD H1 is the reference chart, where `InpSwingBars` `20` covers most of a day. On M5 the ladder redraws constantly. H4 and daily charts hold a range far longer.
When the Double Fibonacci Indicator fails
Levels are projections from a recent range, not price memory.
A twenty-bar window redraws the whole ladder when a new extreme prints.
Ten lines plus arrows leave a busy chart, especially on a small screen.
Copy the compiled Double Fibonacci 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: Fibonacci Retracement Strategy.
Background reading on the method behind the Double Fibonacci Indicator: Fibonacci retracement on Wikipedia, Fibonacci Fans at StockCharts ChartSchool.
Download the Double Fibonacci Indicator for MT4 and MT5
The zip holds the compiled Double Fibonacci 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
What does InpSwingBars 20 define?
The window the swing high and swing low come from. Twenty bars is short enough to track a recent range and long enough to survive a single noisy candle. Widen it and the ladder settles down, at the cost of reacting later.
What does the Ext +1.618 line measure?
A distance of roughly six tenths of the range beyond the swing high. The ratio comes from the classic sequence, and the code applies it to the range rather than to a retracement. Its mirror sits below the swing low.
Do the Ext levels redraw as new bars print?
Yes, whenever a new high or low enters the twenty-bar window. That changes the range, and every level is a function of the range. Expect the whole ladder to shift after a strong candle rather than staying pinned.
Does InpEnablePush start switched on?
No. Only `InpEnableAlerts` and `InpEnablePopup` arrive true, so the terminal dialog is the default route. Set `InpEnablePush` for a phone notification, `InpEnableEmail` for mail, or `InpEnableSound` to play the clip.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Double Fibonacci Indicator as one input. Always backtest before trading live.
Category: this is part of our Oscillators collection. Also, browse more Oscillators for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- The core method is documented in Fibonacci retracement on Wikipedia.
- Additional market context is at Fibonacci Fans at StockCharts ChartSchool.
