Pure Trend Runner
Enters when a fast exponential average crosses a slow one while volatility is rising, then lets the trade run to a fixed stop or a fixed, wider target. It opens and closes its own trades, so test it on a demo account first.
DRF_Pure_Trend_Runner_EA · version 1.00 · Trend following
Test it on a demo account first. When everything works as you expect, use it on a real account.
Used by the author on XAUUSD (gold). It works on any symbol.
The problem it addresses
Many trend rules add exits, trailing stops and break-even steps that are hard to judge. A rule with a stop, a target and nothing in between is easy to understand, to test and to compare.
What it does
Watches a fast and a slow exponential average (8 and 21 by default). When the fast one crosses the slow one while the volatility (the standard deviation of the close, 20 candles) is rising, it enters.
The trade runs to a fixed stop (2.0 ATR) or a fixed target (3.5 ATR). There is no indicator exit, no trailing stop and no break-even.
It opens and closes its own trades, one position at a time, with the magic number 26110002.
Who it is for: Traders who want the simplest trend rule with a fixed stop and target, and who will test it on a demo account first.
Symbols and timeframes: Written to run on any symbol that allows trading; the stop, the target and the lot adapt through the ATR. It reads closed bars of the chart's timeframe.
Real accounts: on a demo account it trades at once; on any other account it sends no order until you tick the input "I confirm this is a real account I want to trade". Test the EA on a demo account first. When everything works as you expect, use it on a real account.
The idea behind it
Join a trend that has just started and keep the rule simple: a stop, a target and nothing in between.
History
Version 1.00 is the first public version, built from the specification of the earlier Gold Pure Trend Runner tool on the shared DRF strategy base, with ATR distances and a risk-based lot. Mechanics were checked on a demo account and in the Strategy Tester. This page makes no claim about results.
Indicators used
- Exponential averages (8 and 21)
- Standard deviation of the close (20)
- ATR (14)
What is included
- Entry on an average cross with rising volatility
- Fixed stop and fixed target in ATR multiples
- Spread, news, trading-hours and daily-loss filters
- Panel with the licence state, the account type and the reason for not trading
What is not included
- It does not promise or imply any result
- No trailing stop, no break-even and no indicator exit
- It does not run on a real account until you tick the confirmation input
How it works
- On every new closed candle it compares the fast and the slow average and the volatility reading.
- A new cross in one direction with rising volatility is an entry signal.
- If the filters allow it, it works out the lot from your risk percent and the stop distance and sends the order with a stop and a target.
- The trade ends at the stop or at the target. Nothing else changes it.
What you need
- MetaTrader 5 on Windows (the file is a compiled MetaTrader 5 Expert Advisor, .ex5).
- A DRF Key (7-day free trial; see the DRF Key page) and https://sync.donaldsonrf.com in the WebRequest list of the terminal, for the key check only.
- Algo Trading switched on, and "Allow Algo Trading" ticked for the Expert Advisor.
- A demo account to test on. A real account only after you have tested and tick the confirmation input.
- Enough history on the chart for the indicators (about 100 bars). If there is too little, the chart is refused and the panel says so.
- A symbol that allows trading and gives a usable tick value. The EA refuses a chart where it cannot work out a position size, and says why on the panel.
How to install and test it
- Download the ZIP below and unzip it. It holds the Expert Advisor file (.ex5), a settings preset (.set) with an empty DRF Key, and INSTALL.txt with these steps.
- In MetaTrader 5 choose File > Open Data Folder, open MQL5 > Experts, and copy the .ex5 file there. Back in MetaTrader, right-click Expert Advisors in the Navigator and choose Refresh.
- Tools > Options > Expert Advisors: tick "Allow algorithmic trading" and "Allow WebRequest for listed URL", then add https://sync.donaldsonrf.com to the list. Nothing else is needed. Press OK.
- Press the Algo Trading button in the top toolbar so it turns green.
- Drag the Expert Advisor from the Navigator onto a chart. On the Common tab tick "Allow Algo Trading". On the Inputs tab type your DRF Key in the first input (optionally load the .set preset first).
- Within about a minute the chart panel shows the state of your licence. If it says PAUSED, the panel tells you why. Test the EA on a demo account first. When everything works as you expect, use it on a real account.
- The first time, attach it to a chart of a DEMO account. Orders are sent without any extra tick on a demo account.
- Watch the panel on the chart. It shows the licence state, the account type, how many positions this EA has open and why it is not trading, if it is not.
- When everything works as you expect on the demo account, you can use it on a real account: on the Inputs tab, tick "I confirm this is a real account I want to trade". Without the tick the EA sends no order on a real account.
The key: every DRF Expert Advisor needs a DRF Key, with a 7-day free trial. Every plan, and the trial, unlocks the whole Expert Advisor.
Safety behaviour
- One position at a time on the symbol by default (you can raise the number in the Filters group).
- Every order is sent with a stop loss and a take profit.
- The lot size comes from the risk percent and the stop distance. If the smallest lot of the symbol would risk more than 1.5 times your wish, the EA does not trade and says so.
- On a real account no order is sent until you tick the confirmation input. A demo account needs no tick.
- A wide spread, important news, the hours outside your trading window and an optional daily loss stop each hold back NEW trades.
- The magic number is an input (default in the block 26110001 to 26119999). A value outside that block makes the EA refuse to trade and say so.
- An invalid DRF Key pauses the EA: no NEW order is opened. It never removes itself from the chart and never closes a position because of the licence. A position that is already open keeps its stop, its target and the EA's own exit rules.
- Orders are retried only after temporary errors (requote, price change, timeout, lost connection). A refused order is not repeated blindly.
What can go wrong
- The panel says PAUSED: no DRF Key entered.
- Type your DRF Key in the first input (Inputs tab). The key looks like DRF-XXXXX-XXXXX-XXXXX.
- The panel says the key could not be checked.
- Check that https://sync.donaldsonrf.com is in Tools > Options > Expert Advisors > "Allow WebRequest for listed URL", that the terminal is online and that the key has not expired. Error 4014 in the Experts log means the address is missing from the list.
- The panel says "REAL account: orders are blocked".
- This is the safety lock. On any account that is not a demo, tick "I confirm this is a real account I want to trade" on the Inputs tab, after you have tested the EA on a demo account.
- The EA does not trade and I do not know why.
- Read the status line on the panel. The usual reasons are: outside the trading hours, important news close by, a wide spread, a position already open, the daily loss stop reached, or no setup yet. The rules only act on closed candles, so a setup can take hours or days to appear.
- The panel says the chart is refused.
- The reason is written on the panel and in the Experts log. Common causes: trading is disabled for the symbol, the symbol has too little history for the indicators (open the chart, scroll back or press Home to load history), a period input is nonsense, or two timeframes do not make sense together.
- The panel says the magic number is outside the registered block.
- Set "Magic number" back to its default or to a number between 26110001 and 26119999.
- It says the smallest lot would risk too much.
- The account is too small for the stop distance on this symbol, or the risk percent is too low for the smallest lot. Lower the stop distance, choose another symbol, or raise the risk percent only if you accept that risk.
- I do not see any panel or object on the chart.
- Press the Algo Trading button so it turns green, tick "Allow Algo Trading" on the Common tab, and look for the smiling face in the top right corner of the chart. Check the Experts tab of the Toolbox for messages.
- The Strategy Tester behaves differently from a live chart.
- The tester has no economic calendar, so the news filter is not applied there; the EA writes one line in the log to say so. Use the Tester build only in the tester, and do not read a tester run as a promise of any result.
Manual: every setting in plain language
Allow https://sync.donaldsonrf.com in MetaTrader's WebRequest list and enter your DRF Key in the first input.
DRF Key
- DRF Key (default: empty)
- Your DRF Key (it looks like DRF-XXXXX-XXXXX-XXXXX). Leave it empty and the EA stays paused and says so on the chart. A paused or lapsed key stops NEW orders only.
Strategy
- Fast average period (default: 8)
- The number of candles of the fast exponential average.
- Slow average period (default: 21)
- The number of candles of the slow exponential average. A trade is considered when the fast one crosses the slow one.
- Volatility period (standard deviation of the close) (default: 20)
- The number of candles used to measure volatility. The entry requires this volatility to be rising.
Risk
- Risk per trade (percent of the balance) (default: 1.0)
- How much of the account balance one trade may lose if its stop is hit. The lot size is worked out from this and from the stop distance. If even the smallest lot would risk more than 1.5 times this wish, the EA does not trade and says so on the chart.
- Stop distance (ATR multiples) (default: 2.0)
- How far the stop loss is placed from the entry, measured in ATR (the average size of a recent candle on this symbol), so it adapts to the symbol and to the market of the day.
- Target distance (ATR multiples) (default: 3.5)
- How far the take profit is placed from the entry, in ATR multiples.
- ATR period (default: 14)
- The number of candles the ATR averages. 14 is the usual choice.
Filters
- Wait while the spread is wider than this many times its usual size (0 = off) (default: 4.0)
- New trades wait while the spread is unusually wide. "Usual" is the symbol's own typical spread, so there is no fixed number to adjust per symbol. 0 switches the check off.
- Pause new trades around high-importance news for the symbol's currencies (default: on)
- No new trade shortly before and after important news for the currencies of the symbol (it uses the MetaTrader economic calendar). The Strategy Tester has no calendar, so in the tester this filter is not applied and the EA says so.
- News: stay out this many minutes before (default: 20)
- Minutes before an important news event during which no new trade is opened.
- News: stay out this many minutes after (default: 20)
- Minutes after an important news event during which no new trade is opened.
- Open new trades only inside the hours below (server time) (default: on)
- When on, new trades open only between the two hours below. Trades already open are not closed by this.
- Trading hours start at (hour, 0 to 23, server time) (default: 7)
- First hour of the trading window, in your broker's server time (not your local time).
- Trading hours end at (hour, 0 to 23, server time) (default: 21)
- The hour at which the trading window ends, in your broker's server time.
- Stop opening new trades after a daily loss of this many percent (0 = off) (default: 0.0)
- If the losses of today reach this percentage of the balance, no new trade is opened until the next server day. 0 switches it off (the default).
- Most positions open at the same time (this EA, this symbol) (default: 1)
- How many positions this EA may keep open on this symbol at once. The default is 1.
Account
- I confirm this is a real account I want to trade (default: off)
- Safety lock. On a demo account the EA trades without it. On any other account the EA does NOT send orders until you tick this box; the chart says "REAL account: orders are blocked". Tick it only after you have tested on a demo account and everything works as you expect.
- Magic number (unique for each EA; change it only to run two copies on one symbol) (default: 26110002)
- The number written on every order of this EA; the EA recognises its own positions by it. Keep the default unless you run two copies on one symbol. It must stay inside the block 26110001 to 26119999, otherwise the EA refuses to trade and says so on the chart.
Download
DRF_Pure_Trend_Runner_EA_v1-00.zip (77 KB) ↓
The file runs only with a valid DRF Key.
Brokers and hosting I use
I recommend only what I use. I have been a client of IC Markets, IC Trading, FTMO and IONOS for many years.
- IC Markets is the broker of the DRF Signal account, and the broker I use myself.
- IC Trading is my suggestion if you live in Brazil or Europe.
- FTMO is my suggestion if you want a prop firm, anywhere in the world. I use an FTMO Classic account (FTMO Swing), because it leaves me full freedom.
- IONOS is the hosting company. The whole system runs on a Windows Server 2025 VPS at IONOS in New York, close to the broker.
These are affiliate links. If you open an account or buy through them I may be paid a commission, at no extra cost to you. Read the Affiliate Disclosure and the full page. Trading carries a high level of risk; check that a company is authorised in your country before you use it.
Frequently Asked Questions
- How is it different from the MA Cross EA?
- Both use the same 8 and 21 average cross. The Pure Trend Runner also needs rising volatility and keeps a fixed stop and target, while the MA Cross EA also closes at the first candle that goes against the trade. Running both on one symbol doubles the same bet; each has its own magic number.
- Does it trade on a real account straight away?
- No. On a demo account it trades at once. On a real account it sends no order until you tick the confirmation input.
- Why a fixed stop and nothing else?
- It is a design choice to keep the rule simple. A fixed stop is hit in a reversal, which is part of the risk.
- Can I change the averages?
- Yes. The fast and slow periods, the volatility period, the stop and the target are inputs. Test any change on a demo account first.
- Will it make a profit?
- No result is promised. Read the Risk Disclosure.
- Do I need a key to run it?
- Yes. Every DRF Expert Advisor needs a DRF Key, with a 7-day free trial. See the DRF Key page.
- 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.