Release Reflex Basket
- Experts
- Version: 1.0
- Activations: 5
Release Reflex Basket — Version 1.00
Original MetaTrader 5 Expert Advisor that trades the first minutes after scheduled economic releases. It reads high-importance events from the built-in MetaTrader 5 Economic Calendar, scores them, waits for price to react, and then opens a basket of 20 to 50 market orders (default 20) in the direction of the reaction. The basket shares one stop, takes profit on a ladder, trails, and is closed after 30 minutes. No grid, no martingale, no averaging down, no lot escalation. It does not use artificial intelligence, a neural network, WebRequest, DLLs or any outside data feed: the logic is calendar-event scoring plus a price-reaction rule.
IMPORTANT — HONEST RESULTS DISCLOSURE
In my own Strategy Tester runs the default settings made money on gold in the most recent 12 months but LOST money on gold in the 12 months before that, and LOST money on EURUSD in both periods. Results swing a lot from year to year. Treat this as a transparent, risk-capped news-basket tool to test on your own broker, not as a proven profitable system. Please run the free demo and your own tests before buying. No profit is promised or implied.
Event source: live calendar vs Strategy Tester
Live (EventSource = Auto or Calendar): the EA calls CalendarValueHistory for the symbol's currencies (EURUSD uses EUR and USD; XAUUSD uses USD). Events below MinImportance (default High) are ignored. Score = importance points (1-3) + surprise points (0-2, from actual vs forecast once published). The default minimum score is 3. If RequireCalendarAgreement is on and the calendar's published impact for the currency points against the price reaction, the event is skipped. Calendar times are broker server time.
The MetaTrader 5 Strategy Tester has no Economic Calendar data. In the tester, and in MQL5's automatic validation, the EA therefore uses a fixed release-time schedule instead: weekdays 08:30 New York time (default ScheduleSet), converted with ServerMinusNewYorkHours = 7, which fits most GMT+2/GMT+3 servers. Most high-impact US releases (payrolls, CPI, retail sales, jobless claims, GDP) come out at 08:30 New York, but not every weekday has a release. So backtests trade some days that had no news, and they are only an approximation of live calendar behaviour. You can also choose the schedule live (EventSource = Schedule; NFP-only and 08:30 + 10:00 sets are available).
Rules
1. Reaction: within ReactionWindowSec (300 s) after the release, price must move at least TriggerATR (0.8) x the pre-release M5 ATR(14) away from the open of the release minute. No reaction in time means no trade.
2. Basket: OrdersPerEvent market orders (20-50) in the reaction direction. Shared stop at StopATR (1.2 ATR). Take-profits are laddered from TPNearATR (0.6 ATR) for the first order to TPFarATR (1.8 ATR) for the last. Trailing stop from TrailStartATR (0.8 ATR) at TrailDistATR (0.6 ATR). Whole basket closed after BasketMaxMinutes (30).
3. One basket per event and never a second basket while one is open.
On netting accounts the basket is one aggregated position: each order adds volume to the same position with the shared stop, the take-profit ladder is done with partial closes, and the last ladder level is the position's take-profit.
Safeguards
Total basket stop-loss risk is capped at BasketRiskPercent (1% of equity), calculated with OrderCalcProfit. Each order is at least the minimum lot. If the basket does not fit, the order count is reduced (minimum 1). If even one minimum-lot order would exceed the cap, the event is skipped and the journal says why. Margin is limited to 30% of free margin. Before trading it checks the trade mode, market-order permission, session, volume min/max/step, the broker volume limit (SYMBOL_VOLUME_LIMIT), the account order limit (ACCOUNT_LIMIT_ORDERS) and stop/freeze levels, and it runs OrderCheck before every order. Other checks: spread at most 20% of the stop (with an optional absolute cap), MaxSlippagePoints (the EA stops adding orders if price runs away from the first fill), a 3% daily-loss halt that closes the basket, and freeze-level checks before any modify or close. On netting accounts a foreign position on the symbol blocks a new basket. No hidden behaviour and no credentials.
Actual test results — MT5 Strategy Tester, JustMarkets-Demo2 history, every input set explicitly
Listed result (v1.00 defaults): M5 chart, every tick based on real ticks (100% history quality), 2025-11-01 to 2026-11-01, USD 10,000, 1:100, hedging, schedule mode.
XAUUSD: net +1,713.01 USD | profit factor 1.24 | max equity drawdown 948.24 USD (8.39%) | 3,109 trades (189 baskets; 78,577,222 ticks).
EURUSD: net -444.24 USD | profit factor 0.84 | max equity drawdown 1,089.28 USD (10.79%) | 1,420 trades (71 baskets; 48,313,049 ticks).
Previous 12 months, same defaults (2024-11-01 to 2025-11-01, real ticks, USD 10,000, hedging):
XAUUSD: net -1,713.18 USD | PF 0.75 | equity DD 26.37% | 3,908 trades.
EURUSD: net -1,428.48 USD | PF 0.79 | equity DD 21.21% | 3,200 trades.
Tuning: one pass only. The first draft also traded a 10:00 New York slot and lost more (XAUUSD +454.30, PF 1.03; EURUSD -2,663.70, PF 0.64 over 2025-26). I removed that slot from the default schedule because most days have no 10:00 release. Nothing else was changed, and the previous-year test above was not used for any choice.
Netting, USD 1,000, 2025-11-01 to 2026-11-01 (local checks, not the official validation):
EURUSD H1, 1-minute OHLC: -191.02 USD, PF 0.49, equity DD 22.25%, 308 trades. XAUUSD D1, 1-minute OHLC: -323.15 USD, PF 0.45, equity DD 32.82%, 170 trades. EURUSD H1, real ticks: -52.29 USD, PF 0.82, equity DD 11.11%, 435 trades. XAUUSD D1, real ticks: +136.40 USD, PF 1.26, equity DD 6.21%, 219 trades. Every run opened trades, with 0 failed order requests and no stop-out. The 1-minute OHLC model builds synthetic ticks, which badly hurts fast news logic. Prefer real-tick tests.
Costs, spread and small accounts
News minutes have wide spreads, slippage and requotes. Live fills will be worse than the tester's, and a basket of 20-50 orders pays the spread and any commission on every order. Use a low-spread account with fast execution. On USD 1,000 accounts the minimum lot means far fewer orders per basket (often 1-11), and some events are skipped. The broker may also limit the number of orders or the total volume.
Key inputs
EventSource, MinImportance, MinEventScore, RequireCalendarAgreement, ScheduleSet, ServerMinusNewYorkHours, ReactionWindowSec, TriggerATR, ATRPeriodM5, OrdersPerEvent (20-50), BasketRiskPercent, StopATR, TPNearATR, TPFarATR, TrailStartATR, TrailDistATR, BasketMaxMinutes, MaxSpreadPoints, MaxSpreadFractionOfStop, MaxSlippagePoints, DailyLossPercent, MaxMarginUsePercent, MagicNumber. Use a unique magic number and do not share a netted symbol with another system.
Risk warning
Trading leveraged forex and gold, especially around news releases, carries a high risk of loss and is not suitable for everyone. Gaps and slippage at releases can make losses larger than the stop. Backtests are historical simulations: here they were mixed and partly losing, and they are no assurance of live results. Past performance does not predict future results. No profit, win rate or drawdown limit is guaranteed, and the daily-loss halt does not guarantee a maximum loss. Test on a demo account first and only risk money you can afford to lose.
Screenshots are rendered information panels built from Strategy Tester numbers, not terminal screenshots.
Original MetaTrader 5 Expert Advisor that trades the first minutes after scheduled economic releases. It reads high-importance events from the built-in MetaTrader 5 Economic Calendar, scores them, waits for price to react, and then opens a basket of 20 to 50 market orders (default 20) in the direction of the reaction. The basket shares one stop, takes profit on a ladder, trails, and is closed after 30 minutes. No grid, no martingale, no averaging down, no lot escalation. It does not use artificial intelligence, a neural network, WebRequest, DLLs or any outside data feed: the logic is calendar-event scoring plus a price-reaction rule.
IMPORTANT — HONEST RESULTS DISCLOSURE
In my own Strategy Tester runs the default settings made money on gold in the most recent 12 months but LOST money on gold in the 12 months before that, and LOST money on EURUSD in both periods. Results swing a lot from year to year. Treat this as a transparent, risk-capped news-basket tool to test on your own broker, not as a proven profitable system. Please run the free demo and your own tests before buying. No profit is promised or implied.
Event source: live calendar vs Strategy Tester
Live (EventSource = Auto or Calendar): the EA calls CalendarValueHistory for the symbol's currencies (EURUSD uses EUR and USD; XAUUSD uses USD). Events below MinImportance (default High) are ignored. Score = importance points (1-3) + surprise points (0-2, from actual vs forecast once published). The default minimum score is 3. If RequireCalendarAgreement is on and the calendar's published impact for the currency points against the price reaction, the event is skipped. Calendar times are broker server time.
The MetaTrader 5 Strategy Tester has no Economic Calendar data. In the tester, and in MQL5's automatic validation, the EA therefore uses a fixed release-time schedule instead: weekdays 08:30 New York time (default ScheduleSet), converted with ServerMinusNewYorkHours = 7, which fits most GMT+2/GMT+3 servers. Most high-impact US releases (payrolls, CPI, retail sales, jobless claims, GDP) come out at 08:30 New York, but not every weekday has a release. So backtests trade some days that had no news, and they are only an approximation of live calendar behaviour. You can also choose the schedule live (EventSource = Schedule; NFP-only and 08:30 + 10:00 sets are available).
Rules
1. Reaction: within ReactionWindowSec (300 s) after the release, price must move at least TriggerATR (0.8) x the pre-release M5 ATR(14) away from the open of the release minute. No reaction in time means no trade.
2. Basket: OrdersPerEvent market orders (20-50) in the reaction direction. Shared stop at StopATR (1.2 ATR). Take-profits are laddered from TPNearATR (0.6 ATR) for the first order to TPFarATR (1.8 ATR) for the last. Trailing stop from TrailStartATR (0.8 ATR) at TrailDistATR (0.6 ATR). Whole basket closed after BasketMaxMinutes (30).
3. One basket per event and never a second basket while one is open.
On netting accounts the basket is one aggregated position: each order adds volume to the same position with the shared stop, the take-profit ladder is done with partial closes, and the last ladder level is the position's take-profit.
Safeguards
Total basket stop-loss risk is capped at BasketRiskPercent (1% of equity), calculated with OrderCalcProfit. Each order is at least the minimum lot. If the basket does not fit, the order count is reduced (minimum 1). If even one minimum-lot order would exceed the cap, the event is skipped and the journal says why. Margin is limited to 30% of free margin. Before trading it checks the trade mode, market-order permission, session, volume min/max/step, the broker volume limit (SYMBOL_VOLUME_LIMIT), the account order limit (ACCOUNT_LIMIT_ORDERS) and stop/freeze levels, and it runs OrderCheck before every order. Other checks: spread at most 20% of the stop (with an optional absolute cap), MaxSlippagePoints (the EA stops adding orders if price runs away from the first fill), a 3% daily-loss halt that closes the basket, and freeze-level checks before any modify or close. On netting accounts a foreign position on the symbol blocks a new basket. No hidden behaviour and no credentials.
Actual test results — MT5 Strategy Tester, JustMarkets-Demo2 history, every input set explicitly
Listed result (v1.00 defaults): M5 chart, every tick based on real ticks (100% history quality), 2025-11-01 to 2026-11-01, USD 10,000, 1:100, hedging, schedule mode.
XAUUSD: net +1,713.01 USD | profit factor 1.24 | max equity drawdown 948.24 USD (8.39%) | 3,109 trades (189 baskets; 78,577,222 ticks).
EURUSD: net -444.24 USD | profit factor 0.84 | max equity drawdown 1,089.28 USD (10.79%) | 1,420 trades (71 baskets; 48,313,049 ticks).
Previous 12 months, same defaults (2024-11-01 to 2025-11-01, real ticks, USD 10,000, hedging):
XAUUSD: net -1,713.18 USD | PF 0.75 | equity DD 26.37% | 3,908 trades.
EURUSD: net -1,428.48 USD | PF 0.79 | equity DD 21.21% | 3,200 trades.
Tuning: one pass only. The first draft also traded a 10:00 New York slot and lost more (XAUUSD +454.30, PF 1.03; EURUSD -2,663.70, PF 0.64 over 2025-26). I removed that slot from the default schedule because most days have no 10:00 release. Nothing else was changed, and the previous-year test above was not used for any choice.
Netting, USD 1,000, 2025-11-01 to 2026-11-01 (local checks, not the official validation):
EURUSD H1, 1-minute OHLC: -191.02 USD, PF 0.49, equity DD 22.25%, 308 trades. XAUUSD D1, 1-minute OHLC: -323.15 USD, PF 0.45, equity DD 32.82%, 170 trades. EURUSD H1, real ticks: -52.29 USD, PF 0.82, equity DD 11.11%, 435 trades. XAUUSD D1, real ticks: +136.40 USD, PF 1.26, equity DD 6.21%, 219 trades. Every run opened trades, with 0 failed order requests and no stop-out. The 1-minute OHLC model builds synthetic ticks, which badly hurts fast news logic. Prefer real-tick tests.
Costs, spread and small accounts
News minutes have wide spreads, slippage and requotes. Live fills will be worse than the tester's, and a basket of 20-50 orders pays the spread and any commission on every order. Use a low-spread account with fast execution. On USD 1,000 accounts the minimum lot means far fewer orders per basket (often 1-11), and some events are skipped. The broker may also limit the number of orders or the total volume.
Key inputs
EventSource, MinImportance, MinEventScore, RequireCalendarAgreement, ScheduleSet, ServerMinusNewYorkHours, ReactionWindowSec, TriggerATR, ATRPeriodM5, OrdersPerEvent (20-50), BasketRiskPercent, StopATR, TPNearATR, TPFarATR, TrailStartATR, TrailDistATR, BasketMaxMinutes, MaxSpreadPoints, MaxSpreadFractionOfStop, MaxSlippagePoints, DailyLossPercent, MaxMarginUsePercent, MagicNumber. Use a unique magic number and do not share a netted symbol with another system.
Risk warning
Trading leveraged forex and gold, especially around news releases, carries a high risk of loss and is not suitable for everyone. Gaps and slippage at releases can make losses larger than the stop. Backtests are historical simulations: here they were mixed and partly losing, and they are no assurance of live results. Past performance does not predict future results. No profit, win rate or drawdown limit is guaranteed, and the daily-loss halt does not guarantee a maximum loss. Test on a demo account first and only risk money you can afford to lose.
Screenshots are rendered information panels built from Strategy Tester numbers, not terminal screenshots.
