Home / Coding / Expert Advisors / News Straddle

News Straddle

Places pending orders either side of price shortly before major USD news and trades whichever side triggers.

DRF_News_Straddle_EA · version 2.01 · Strategy · MetaTrader 5

€15   Buy News Straddle →

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

Risk. This Expert Advisor uses a method that can look steady for a long time and then produce a large loss. 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 want to study event-driven volatility on a demo account.

What it does

A straddle around scheduled events. Using the MetaTrader economic calendar, it places a buy stop and a sell stop shortly before selected high and medium impact USD releases (such as Non-Farm Payrolls, CPI and FOMC) and cancels what is not filled.

How it works

  1. Pending orders placed 90 seconds before the event, at a distance of 1.3 times the M5 ATR (at least 350 points).
  2. Untriggered orders expire 4 minutes after the release; a filled trade has a settle period before its stop moves.
  3. Stop 1.6 ATR and target 2.4 ATR; any open position is closed after 45 minutes.
  4. Risk 0.5 percent of the balance per leg, a 3 percent daily loss limit and at most 4 events a day.
  5. The calendar does not work in the Strategy Tester; the EA logs events to a file while it runs and falls back to that file in the tester.

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.01) 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 News Straddle →

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

News filter

InpUseHighImpact (default: true)
Trade HIGH impact news
InpUseMediumImpact (default: true)
Trade MEDIUM impact news
InpNewsCurrency (default: "USD")
Currency to filter news for (the symbol reacts to USD)
InpEventKeywords (default: Non-Farm,NFP,Nonfarm,CPI,Consumer Price,FOMC,Federal Funds,Interest Rate,GDP,Gross Domestic,PPI,Producer Price,Retail Sales,Fed Chair,Powell,Unemployment)
Extra name filter (empty = accept any event matching impact/currency above)

Straddle timing

InpSecondsBeforeNews (default: 90)
Place pending orders X seconds before the event time
InpPendingExpiryMinutes (default: 4)
Cancel an untriggered pending order X minutes after the news
InpSettleSeconds (default: 75)
Do not touch stop/trailing for X seconds after a fill (lets the initial liquidity grab pass)
InpMaxHoldMinutes (default: 45)
Force-close the position at market if still open after X minutes

Distance and risk (ATR-based)

InpATRPeriod (default: 14)
ATR period (M5) used to calibrate distances
InpATRDistanceMult (default: 1.3)
Straddle distance = ATR(M5) * this multiplier
InpMinDistancePoints (default: 350)
Floor for the straddle distance, in points
InpStopATRMult (default: 1.6)
Stop loss = ATR * this multiplier, from the entry price
InpTargetATRMult (default: 2.4)
Target = ATR * this multiplier
InpMaxSpreadPoints (default: 600)
Skip the straddle if spread is already above this at placement time

Session filter

InpBlockFridayClose (default: true)
Do not open new straddles close to the weekend rollover
InpFridayCutoffHour (default: 20)
Server-time hour on Friday after which no new straddles are opened
InpBlockSunday (default: true)
Do not trade in the first hour after the weekly market open (thin liquidity)
InpSundayOpenBufferMin (default: 30)
Minutes to wait after Sunday's first tick before trading resumes

Money management

InpRiskPercentPerTrade (default: 0.5)
% of balance risked per straddle leg
InpFixedLots (default: 0)
If > 0, use a fixed lot size instead of risk-based sizing
InpMaxDailyLossPercent (default: 3.0)
Stop opening new straddles for the rest of the day after this % balance loss
InpMaxNewsPerDay (default: 4)
Maximum number of events traded per day
InpMagicNumber (default: 990211)
The number the EA stamps on its own orders so it can tell them from other EAs' orders. Give each EA on the same account a different number.

Post-result surprise filter

InpUseSurpriseFilter (default: true)
Tighten the stop early if the released data contradicts the open trade's direction
InpMinSurprisePercent (default: 10.0)
Minimum deviation (%) between actual and forecast to count as a relevant surprise

Trade management after fill

InpUseTrailing (default: true)
Switch the trailing stop on or off.
InpTrailingATRMult (default: 1.0)
Trailing distance = ATR * this multiplier, only active after InpSettleSeconds

On-chart panel

InpShowPanel (default: true)
Show the status panel on the chart.
InpPanelX (default: 12)
Horizontal position of the panel on the chart.
InpPanelY (default: 20)
Vertical position of the panel on the chart.

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

Breakout Scalper

An M1 scalper for any symbol: a Donchian channel breakout with a volatility expansion filter and H1 trend context.

Open →

Market Assistant

Expert Advisor for MetaTrader 5 that works on any instrument.

Open →

Frequently Asked Questions

Can I backtest it?
Only after it has been running live or on demo long enough to build the event log, because the calendar functions do not work in the tester.
Is the spread an issue?
Yes. The EA skips the straddle if the spread is already above its limit when it would place orders.
Which events does it use?
A list of keywords in the inputs, including NFP, CPI and FOMC.
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.