Free MT5 Expert Advisor · Version 1.00 · Research/Beta

A diversified currency-carry assistant with account-level risk locks

TF Currency Carry Risk Assistant ranks seven major currencies from monthly BIS policy rates, holds an equal-risk basket long the two highest rates and short the two lowest, and rebalances only after a complete lagged signal passes its safety gates.

Includes .mq5 source, .ex5 binary, BIS-derived signal history and updater, README, reproducible research check and SHA-256 checksums.

Illustration of a diversified currency carry basket protected by a risk shield
Exact rule set

How the monthly basket is selected

  1. The supplied updater downloads monthly central-bank policy rates from the BIS. The EA reads only complete signals from MQL5/Common/Files after a ten-day publication lag.
  2. EUR, GBP, JPY, CHF, CAD, AUD and NZD are ranked by policy rate. The default basket is long the highest two and short the lowest two, each expressed through its USD pair.
  3. The weakest selected long must exceed the strongest selected short by at least 1.00 percentage point. Otherwise the EA holds no carry basket.
  4. Data freshness, spread, trade window, high-impact calendar, foreign-position, margin and account-loss gates must all pass before rebalancing.
  5. Each leg is sized from a 4.0 ATR(20) D1 emergency stop and 0.15% of current equity. A partial basket is never intentionally left open after an entry failure.
Capital protection

Risk controls built into the code

Control Default Purpose
RiskPerLegPercent 0.15% Equity-based stop-risk estimate; inputs above 0.25% are rejected.
MaximumPortfolioRiskPercent 0.60% Rejects a plan whose combined emergency-stop estimate is too large.
EmergencyStopATR 4.00 D1 ATR Uses a wide broker-side disaster stop rather than a tight trading target.
Equity-loss gates 0.75% / 1.50% / 3.00% Closes EA positions and blocks entries for the day, week or month.
Peak-equity lock 6.00% Closes EA positions and requires an explicit manual review/reset.
Projected margin 10.00% maximum Blocks a new basket when projected account margin is too high.
News and spread ±60 min / 3.0 pips Blocks entries around selected high-impact releases or wide quotes.

The source contains no grid, martingale, recovery sizing or averaging down. Its hard caps reject settings above 1.00% planned basket stop risk, 20% projected margin or 10% peak-equity drawdown. These controls cannot guarantee a maximum realised loss during gaps, slippage, disconnections or rejected orders.

Evidence and data

A documented premium—not a free return

Currency carry means holding higher-rate currencies while funding with lower-rate currencies. Research documents historical positive average returns, but also negative skewness and correlated crash risk. The updater uses the official BIS policy-rate series; the included research check also uses BIS monthly USD exchange rates.

BIS policy-rate data · Carry crashes research

Where it struggles

Known failure modes

Carry positions can unwind together during liquidity shocks. Policy rates are only proxies for a broker’s actual swap charges. Triple-swap conventions, revisions, spread expansion, gaps and correlated USD exposure can erase a modest historical edge. A monthly signal also reacts slowly to sudden regime changes.

Research check

What the supplied validation did—and did not show

Modelled cost case Pre-2020 annual return 2020 onward annual return Full-sample annual return
Base: 2 bps turnover + 5 bps monthly financing markup +0.42% +0.35% +0.40%
Stress: 5 bps turnover + 10 bps monthly financing markup -0.06% -0.08% -0.07%

The test uses an unchanged two-long/two-short rule, a one-month information lag, BIS monthly-average exchange rates and trailing 36-month volatility scaling. It is an unlevered research model—not an MT5 broker backtest and not the return of the ATR-sized EA. Base full-sample maximum drawdown was 15.18% before the EA’s live risk locks. The ZIP includes the Python source, dated report and input signals so the calculation can be rerun and challenged.

Before live use

Installation and validation

  1. Extract the ZIP. Copy the .ex5—or the .mq5 and .ex5—to MQL5/Experts.
  2. Copy TF_Carry_Signals.csv to the terminal-wide Common/Files folder. Review and run the supplied PowerShell updater after monthly BIS releases.
  3. Refresh Navigator and attach one EA instance to any chart. Confirm that all seven USD pairs are available and configure broker symbol prefixes or suffixes.
  4. Run broker-specific tests with variable spread, commission, slippage and actual swap rules. The MT5 live calendar filter is not natively reproduced in Strategy Tester.
  5. Forward-test on demo for several monthly rebalances. Review the Experts/Journal logs, all four stop distances, margin and swap charges before any live decision.
Technical integrity

Auditable and reproducible

MQL5 source and compiled MT5 file are supplied. Version 1.00 compiled with 0 errors and 0 warnings. ZIP SHA-256: 60a96132eb05f48c198ede71302051848567409522db5effd5d1f2958bfe0ac3.

Position sizing uses MetaTrader’s account-currency profit estimate rather than assuming a fixed pip value. See the official OrderCalcProfit documentation.

Broker account

Open an account with HFM

You can open an HFM account after comparing its regulation, costs and account terms with your own requirements.

Open an account with HFM

Affiliate disclosure: Trade-Forex.info may receive compensation if you register through the HFM link, at no additional charge to you. Leveraged trading is high risk. This software and page are educational information, not personal investment advice.