Home / Coding / Expert Advisors / Fibonacci Retracement

Fibonacci Retracement

Detects the latest swing, draws a Fibonacci retracement and enters on a pull-back or touch of a chosen level.

DRF_Fibonacci_Retracement_EA · version 7.1 · Strategy · MetaTrader 5

€15   Buy Fibonacci Retracement →

Or get every Expert Advisor, for life, for €150: see the bundle.

Risk. Trading carries a high level of risk and you can lose more than you expected. No result is promised. Read the Risk Disclosure.

Test it on a demo account first. When everything works as you expect, use it on a real account.

It works on any symbol: point-based inputs scale to the symbol you attach it to.

Who it suits

Traders who use Fibonacci levels and want the swing and level handled automatically.

What it does

A rebuild of an older Fibonacci EA, now any-symbol with the shared DRF licence and the MetaTrader news calendar. It finds the last swing high and low, draws the retracement and trades a return to the level you choose.

How it works

  1. Swing detection over the last 25 candles, validated by an 89-period average.
  2. Entry on a pullback or a touch of a Fibonacci level (50 percent by default), with a small tolerance and an optional trend filter from a 200-period average.
  3. Stop at a Fibonacci level or a number of points, with an optional buffer; up to three partial exits at levels or points.
  4. Management: break-even, trailing stop, a pause after a loss (60 minutes by default) and a risk-percent position size.
  5. The rebuild fixed a bug in how the buy-side anchors were assigned and replaced a fragile web-scraped news source with the calendar.

What is included

What is not included

What you need

How to try it

  1. Attach it to a demo chart on the timeframe you want to test.
  2. Set a small lot size (0.10) and leave the other inputs at their defaults.
  3. Read the Experts and Journal tabs and the on-chart panel for the reasons it gives when it skips an entry.
  4. Move to a small live account only after you have seen it behave as expected on demo.

Results

No results are published for this Expert Advisor, and none are implied. Test it on a demo account first. Past results never promise future ones.

Buy once, keep it for life

€15   Buy Fibonacci Retracement →

Manual: every setting in plain language

Enter your DRF Key in the key input. The group "Any-asset scaling" controls how point inputs follow the symbol.

Donaldson R F Licence

InpLicenceKey (default: (empty))
Licence key

General Settings

TradeTF (default: PERIOD_M15)
Trading timeframe
MagicNumber (default: 12312023)
Magic number
OrderComment (default: DRF Fibonacci Retracement EA)
Order comment
MaximumSpread (default: 40)
Maximum spread in points (0 = disabled)
NumberOrdersOpen (default: 1)
Maximum number of open positions

Session Filter

UseTimeFilter (default: Yes)
Use session filter
TradingStartHour (default: 9)
Session start hour
TradingEndHour (default: 19)
Session end hour

Risk Management

UseMM (default: Yes)
Use % risk position sizing
RiskPercentage (default: 1.0)
Risk per trade (%)
DefaultLot (default: 0.10)
Fixed lot size (used when UseMM = No)
UseBreakEven (default: Yes)
Use break-even
BreakEvenPoints (default: 1)
Points beyond open price for break-even
StopTradingAfterLoss (default: Yes)
Pause trading after a loss
MinutesStopAfterLoss (default: 60)
Pause duration in minutes

Trailing Stop

UseTrailingStop (default: Yes)
Use trailing stop
TrailingStartPoints (default: 150)
Gain (points) required before trailing starts
(default: 100)
Distance kept between price and stop (points)
TrailingStep (default: 20)
Minimum step before the stop is moved again (points)

Trend Filter (MA)

UseMATrendFilter (default: Yes)
Use trend filter
TFMATrendFilter (default: PERIOD_M15)
Timeframe of the trend MA
MAAvePeriod (default: 200)
Trend MA period
MAAveMethod (default: MODE_SMA)
Trend MA method

Fibonacci Swing Detection

FiboBars (default: 25)
Number of candles used to find the swing high/low
MAPeriodTrend (default: 89)
Period of the MA used to validate the swing
MAAveMethodSetUp (default: MODE_SMA)
Method of that MA

Fibonacci Setup Renewal

SecondAnchorLevel (default: 0)
Level treated as the "end" of the move (x10)
FirstAnchorLevel (default: 1000)
Level treated as the "start" of the move (x10)
FiboSetupRenew (default: Cross_Level)
How the current setup is discarded

Entry Rules

PullBackTouch (default: PullBack)
Enter on pullback or on touch
EntryFiboLevel (default: Level_500p)
Fibonacci entry level
EntryToleranceP (default: 5)
Tolerance (points) between price and entry level
FiboBetwLevels (default: No)
Require the MA to sit between two levels
LowestLevelP (default: 382)
Lower band level (x10)
HighestLevelP (default: 618)
Upper band level (x10)

Target Rules

TPMode (default: Fibonacci_Level)
TP by Fibonacci level or by points
NumberExits (default: ChoiceTP1)
Number of partial exits (TP1/TP2/TP3)
TP1Points (default: 100)
TP1 in points (used when TPMode = Number_of_Points)
TP2Points (default: 200)
TP2 in points
TP3Points (default: 300)
TP3 in points
TP1LevelP (default: 0)
TP1 Fibonacci level x10 (0 = at the swing extreme)
TP2LevelP (default: 0)
TP2 Fibonacci level x10
TP3LevelP (default: 0)
TP3 Fibonacci level x10

Stop Loss Rules

SLMode (default: Fibonacci_Level)
SL by Fibonacci level or by points
SLUsingPoints (default: 300)
SL in points (used when SLMode = Number_of_Points)
SLUsingFiboLevelP (default: 1000)
SL Fibonacci level x10 (used when SLMode = Fibonacci_Level)
UseNumPointsFibo (default: Yes)
Add extra buffer to the Fibonacci-based SL
NumPointsFiboAway (default: 50)
Extra buffer (points)

News Filter (native MT5 calendar)

NFuse (default: false)
Enable news filter
NFhigh (default: true)
Block around high-impact news
NFhighBefore (default: 120)
Minutes before (high impact)
NFhighAfter (default: 120)
Minutes after (high impact)
NFmed (default: true)
Block around medium-impact news
NFmedBefore (default: 90)
Minutes before (medium impact)
NFmedAfter (default: 90)
Minutes after (medium impact)
NFlow (default: true)
Block around low-impact news
NFlowBefore (default: 15)
Minutes before (low impact)
NFlowAfter (default: 15)
Minutes after (low impact)

Status Panel

ShowPanel (default: true)
Show on-chart status panel

Any-asset scaling

InpAutoScalePoints (default: true)
Scale point-based inputs to this symbol's volatility (default values are tuned for a ~3000-point daily range) Leave on unless you know the symbol is much calmer or wilder than the usual daily range.

Related Expert Advisors

Exhaustion Reversion

Fades a stretched move: price far from its average, confirmed by RSI, Bollinger Bands and a hammer or shooting-star candle.

Open →

Line Trader

A chart-line execution assistant: draw a line, choose its action, and the EA acts when price reaches it.

Open →

Trend

Draws its own trend lines through swing points and trades the touch, with stops at support and resistance.

Open →

Frequently Asked Questions

Which levels can it use?
Any level from a list, set by 'Fibonacci entry level'; 50 percent is the default.
Is the news filter on?
It is off by default in this EA; switch it on in the inputs.
Does it use several targets?
Optionally: up to three partial exits.
Do I need a DRF Key to run it?
Yes. The file is free to download, but the EA checks a DRF Key against the licence server when it starts and then every hour. Plans and prices are on the DRF Key page.
Which provider and account should I use?
Any MetaTrader 5 account that offers the symbol. Test on a demo account first; the source does not tie the EA to one provider.
Does it guarantee a result?
No. Trading carries risk and an EA can lose money. The project holds no published performance figures for this EA, so none are shown.
Which symbols does it work on?
Any symbol your provider offers. Inputs that are measured in points scale automatically to the symbol's usual daily range, so the same preset behaves sensibly on a forex pair, an index or Bitcoin. Always test on a demo account first.
Do I need a key to run it?
Yes. After you buy, you receive a DRF Key. It works for life and on up to 5 internet addresses at the same time.
Is there a subscription?
No. You pay once and keep it for life, with free updates.
Does it promise a result?
No. Read the Risk Disclosure. Test on a demo account first; when everything works as you expect, use it on a real account.

Get Expert Advisor and coding news

New Expert Advisors, updates, price changes and videos, by e-mail. A short e-mail only when something is really new. One click to unsubscribe.

You get one e-mail to confirm first. By subscribing you agree that I use your address to send this newsletter. See the Privacy Policy.

Protected by Google reCAPTCHA. The Google Privacy Policy and Terms of Service apply.

Running into a technical issue or something that doesn't work right on this page? Please let us know straight away via our Contact page. That is how we find out what is broken and get it fixed.