Two conservative trading assistants with visible risk controls
These Expert Advisors automate two transparent, rules-based examples: a trend breakout and a selective range re-entry. Both use completed candles, percentage-risk sizing, spread limits and a daily loss lock.
Includes editable .mq5 source and compiled .ex5 files · MetaEditor: 0 errors, 0 warnings

Simple logic you can inspect
TF Donchian ATR Assistant
A completed H4 close outside the prior 55-bar Donchian channel provides the setup. A 200 EMA filters direction; ATR sets the stop and the default target is 2.5R.
- Default risk: 0.50% per trade
- Hard maximum: 1.00%
- 2.00% daily equity-loss lock
- No averaging down or grid logic
TF Bollinger RSI Range Assistant
A completed H1 candle must return inside the Bollinger Band after an RSI extreme. ADX must indicate a non-trending regime; ATR provides the protective stop and the middle band is the target.
- Default risk: 0.25% per trade
- Hard maximum: 1.00%
- 1.50% daily equity-loss lock
- Minimum reward/risk gate
What the code does—and does not do
✓ Position sizing: estimates one-lot stop loss with MT5 OrderCalcProfit, then sizes to the selected account-risk percentage.
✓ Entry discipline: evaluates only when a new signal candle begins, using the candle that just closed.
✓ Execution filters: skips entries above the maximum spread, outside the optional time window or when any position already exists on the symbol.
✕ No certainty: a broker may reject orders, gaps can exceed stops, and the daily lock resets from equity seen when the EA is running at the start of a new server day.
Why these ideas were selected
The trend example is inspired by documented time-series momentum across liquid futures, including currency instruments. That supports the broad phenomenon—not this exact code, parameter set or future return. The range example combines long-established Bollinger, RSI and ADX tools to illustrate a restrictive mean-reversion setup; persistent trends remain its central failure mode.
Install and test in six steps
- Download and unzip the pack.
- In MT5 choose File → Open Data Folder.
- Copy .mq5 or .ex5 files to MQL5/Experts/Trade-Forex/.
- Compile the source in MetaEditor, then refresh MT5 Navigator.
- Backtest one symbol and timeframe at a time with every-tick modelling and realistic costs.
- Forward-test on demo and compare fills, spread and behaviour with the backtest before making any live decision.
Test with a demo account first
Check regulation, spreads, commission, swap and execution for your jurisdiction. The HFM button is an affiliate link; Trade-Forex.info may receive compensation if you register through it, at no extra cost to you.
Educational software only—not personal financial advice or a recommendation to trade. Leveraged products are high risk. Version 1.00 · September 2026.
