YazanPro Activity Burst Scalper
- Experts
-
Yazan Adnan Ramadan Ibrahim
Algorithmic trader and MQL5 developer based in Jordan. I build Expert Advisors for MetaTrader 5 focused on gold (XAUUSD) and major FX pairs: multi-module confluence systems, short-hold scalping tools and manual trade panels. Each product is tested in the Strategy Tester on real ticks with - Version: 1.0
- Activations: 10
YazanPro Activity Burst Scalper is an experimental Expert Advisor for traders who want to study one idea on their own broker's data: short bursts of market activity. Price does not move at an even pace. Now and then the number of ticks per minute and the size of the 1-minute bars jump well above their usual level for a few minutes. This EA measures those bursts, opens a short trade when one starts, and closes it quickly.
Please read this first. With the default settings this EA lost money in every backtest that placed trades, on gold, EURUSD and GBPUSD. Every stop-loss, take-profit and time-stop variant we tried on a development build lost as well. Most trades win a very small amount, while a few trades reach the far safety stop and lose more than all the small wins together. The results are listed below under "Tested settings you can repeat". This product is a tool for testing and adjusting the idea. It is not a profitable system and it does not promise any result.
How it measures activity
Every second the EA reads the 1-minute bars of each symbol it trades. It compares the last 3 minutes (the current minute counted pro rata) with the 60 one-minute bars before them, on two measures: ticks per minute and the average 1-minute high-low range. The smaller of the two ratios is the activity score, shown on the panel, for example 2.3x. The EA reads 1-minute data itself, so the chart timeframe does not change its decisions.
How it enters
A burst starts when the score reaches 2.0 (input). The EA then waits for a low spread: it trades only on a tick whose spread is the lowest of the last 10 seconds (input, sampled every 100 ms) and no more than 2 x Q. Q is the median of the minute-bar spreads of the last hour (MetaTrader stores the lowest spread of each minute), at least 1 point. An optional fixed spread cap in points can tighten this further. The default direction is BUY only. The FOLLOW option sells when price fell over the last 3 minutes and buys otherwise.
After that trade closes, the EA may trade again in the same burst while the score stays at 1.5 or more (input), up to 3 trades per burst (input). The trades of a burst come one after another, never at the same time. The first check below 1.5 ends the burst. A new burst needs the score to fall below 1.5 and then reach 2.0 again.
How it exits
Each trade has up to four exits:
- Take profit on the server. With the default instant close option it is the price move worth a set amount per 1.00 lot: 5 for metals and 1 for other symbols, in the account currency. On a USD account and a standard EURUSD contract, 1 USD per lot is a 1-point move. With instant close OFF, the target is a number of points you set, or by default a 1.00 price move on gold quoted in USD and 2 x Q elsewhere.
- Instant close: checked every 100 ms, it closes the trade at market once its profit reaches that amount times the lot.
- Time stop: the trade is closed at market once 5 minutes (input) have passed since it opened.
- Safety stop loss on the server at 100 x (input, 0 = off) the larger of the target and 2 x Q. With the defaults it is at least 100 times farther away than the take profit.
That last point is the main risk of the design: many small wins can be undone by one trade that runs to the safety stop. In the one-year gold backtest below (Strategy Tester backtest, hypothetical, not real trading), 2,488 trades closed at the small take profit and the average winning trade was +0.05 USD, while 258 trades hit the safety stop and the average losing trade was -5.98 USD, at 0.01 lot.
The panel
A panel in the top-left corner of the chart shows the rule in two short lines, a status line (ON, OFF, Algo Trading off, news filter idle, close all in progress), open positions against the maximum, and today's number of trades and result of this EA on this chart's symbols, in the account currency.
The controls are a lot box (up to the "Highest lot" input), ALL / Gold / Silver buttons to trade every listed symbol or only one, the instant close switch with its two amounts, an ON/OFF button for new trades and a "Close all + stop" button that needs two clicks within 3 seconds. Gold and Silver appear only when XAUUSD and XAGUSD are in the list, and clicking any symbol name selects that symbol alone.
Each symbol row shows the activity score, the state (quiet, above normal, a lot of movement now, burst done, market closed) and, during a burst, why it is not trading yet, for example spread too wide, waiting for the lowest spread, news window, maximum positions open, lot below the minimum or OFF. It also shows the current spread against the allowed maximum. The selected symbol comes first, then the others by activity.
OFF stops new trades only: an open position keeps its take profit, safety stop, time stop and instant close. The switch, lot, instant close switch, instant close amounts and symbol choice are saved per magic number and chart symbol and survive a terminal restart. The EA starts ON when first attached. Removing it from the chart resets the switch, so the next attach starts ON again. The panel is in English; an Arabic panel is optional. All Experts log messages are in English.
Symbols and timeframes
By default the EA trades only the symbol of its chart, on any timeframe. You can enter a comma-separated list of symbols instead; symbols with trading disabled are left out and named in the Experts log. The chart's own symbol always stays; if its trading is disabled, its panel row shows "disabled". Names starting with XAU, XAG, XPT, XPD, GOLD or SILVER, and symbols in a "Metals" folder, use the metals amount. There are no preset files.
Several charts can run the EA with the same magic number if they trade different symbols. If a symbol is already traded by another chart with the same magic number, the EA does not start on the second chart and says why in the Experts log.
Risk controls
The lot is fixed (0.01 by default), rounded down to the symbol's volume step and capped at its maximum and volume limit. If it is below the symbol minimum, the EA does not trade that symbol and prints a message. Before every order it checks the trading session, the allowed trade direction, the volume limit, the stops level for both stops, the account order limit and free margin. If a check fails it waits 60 seconds and prints the reason once per symbol per day.
At most 3 positions (input) are open at once across this chart's symbols, and at most one per symbol. A failed order is retried after 5 seconds, or 5 minutes when the market is closed, trading is disabled or money is short. After 3 failures that burst is given up. The time stop and instant close wait while the session is closed, and while a stop is inside the freeze level, where the server's own stop can fire.
An optional news filter blocks new trades within N minutes of high-impact events of the symbol's base or profit currency from the MetaTrader economic calendar. It works live only (the Strategy Tester has no calendar) and is off by default. When Algo Trading is off, the EA opens no trades and its time stop and instant close wait; the take profit and safety stop on the server still apply.
Account types
Hedging and netting accounts are supported. On a netting account the EA does not trade a symbol while another EA's or a manual position is open on it. All backtests below ran on a hedging account.
What it does not do
It does not use martingale, grid, averaging or larger lots after a loss: every trade uses the same lot, and only one position per symbol is open at a time. It has no trailing stop or break-even. It uses no DLLs, no web requests and no external indicators. It does not guarantee any result, and its default settings lost money in our tests.
Support is provided through MQL5 private messages and the product comments only.
Tested settings you can repeat
Strategy Tester backtest, hypothetical, not real trading.
Hypothetical or simulated performance results have certain inherent limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not actually been executed, the results may have under- or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown.
Common settings for runs 1 to 5: Expert YazanPro Activity Burst Scalper 1.00 with all inputs at their defaults (0.01 lot, BUY, instant close 5 / 1 per lot, 5-minute time stop, safety stop 100 x, news filter off). History: MetaQuotes-Demo. Modelling: 1 minute OHLC. Delays: zero latency, ideal execution. Deposit 10,000 USD (run 5: 1 USD), leverage 1:100, hedging account, no optimization.
Run 1. XAUUSD, D1 chart, 2025.10.01 - 2026.10.01. Strategy Tester backtest, hypothetical, not real trading. 3,115 trades, 79.87% winning trades, net result -3,624.33 USD, profit factor 0.03, maximal equity drawdown 3,628.36 USD (36.28%). 2,488 trades closed at the take profit and 258 at the safety stop loss; the rest closed at market. Average winning trade +0.05 USD, average losing trade -5.98 USD.
Run 2. EURUSD, H1 chart, 2026.06.01 - 2026.10.01. Strategy Tester backtest, hypothetical, not real trading. 1,457 trades, 74.40% winning, net -97.41 USD, profit factor 0.10, maximal equity drawdown 97.46 USD (0.97%).
Run 3. GBPUSD, M30 chart, 2026.06.01 - 2026.10.01. Strategy Tester backtest, hypothetical, not real trading. 1,234 trades, 73.34% winning, net -114.64 USD, profit factor 0.07, maximal equity drawdown 115.05 USD (1.15%).
Run 4. EURUSD, M1 chart, 2026.09.01 - 2026.10.01. Strategy Tester backtest, hypothetical, not real trading. 563 trades, 73.00% winning, net -42.05 USD, profit factor 0.09, maximal equity drawdown 42.10 USD (0.42%).
Run 5. EURUSD, H1 chart, 2026.09.01 - 2026.10.01, deposit 1 USD. Strategy Tester backtest, hypothetical, not real trading. 0 trades: 0.01 lot needed about 11.6 USD of margin, so the EA logged "not enough free margin" and did not trade.
In plain words: with the default settings the EA lost money in all four runs that traded. On gold it lost 36% of the deposit in one year at 0.01 lot. The win rate is high because the target is tiny; the result is negative because the rare losses are large.
1 minute OHLC uses only the open, high, low and close of each minute, while this EA works on ticks and spreads. Please repeat any test with "Every tick based on real ticks" on your own broker; results will differ.
Earlier development builds of the same idea (Strategy Tester backtest, hypothetical, not real trading; real ticks, 0.01 lot):
- First build (no lowest-spread wait, no instant close), XAUUSD, XAGUSD, EURUSD, GBPUSD and USDJPY, 2026.10.19 - 2026.10.29: 945 trades, 74.6% winning, net -151.65 USD, profit factor 0.56. Every symbol lost.
- Build with the same entry and exit rule as this product, five symbols, 2026.10.17 - 2026.10.30: 1,123 trades, 83.8% winning, net -193.71 USD, profit factor 0.17.
- A grid of stop-loss distances (1x, 2x, 3x), take-profit amounts (10/2, 20/4 and 2/0.5 per lot for metals/others), 15- and 30-minute time stops and their combinations, 2026.10.19 - 2026.10.30: every variant lost, on every symbol. The same build over 2026.09.21 - 2026.10.19 lost 364.74 USD.
Our reading of these tests: the entries showed almost no price drift in the trade direction, so the spread cost decides the result. A development build running on the seller's demo account (simulated money, not real trading) closed 16 trades on 2026.10.30 up to 22:00 (UTC+3), one of them by hand, for -26.16 USD (11 trades at 0.01 lot: -0.38 USD; 5 trades at 1.00 lot: -25.78 USD).
Inputs
The first column is the text shown in the Inputs tab.
General
Input (as shown) | Default | Meaning
Symbols, comma separated ("" = the chart symbol only) | "" | Symbols this chart trades; empty = the chart symbol only.
Starting lot per trade (the panel lot box changes it) | 0.01 | Fixed lot of every trade until changed in the panel.
Highest lot the panel lot box accepts | 1.0 | Upper limit for the lot box; the starting lot must not exceed it.
Magic number (charts may share it: one chart per symbol per magic number) | 20261041 | Identifies this EA's positions; one chart per symbol per magic number.
Panel language: false = English, true = Arabic | false | Panel language; Experts log messages stay English.
News filter: no new trade +- N min around high-impact calendar news of the symbol's currencies (0 = off) | 0 | Minutes blocked before and after high-impact events; live only.
Positions open at the same time, all symbols of this chart together | 3 | Maximum open positions of this chart (one per symbol).
Symbols shown on the panel (most active first) | 12 | Number of symbol rows on the panel.
Entry rule
Input (as shown) | Default | Meaning
Direction | BUY | BUY only, or FOLLOW the move of the last 3 minutes.
Start a burst when activity >= this x normal (last hour) | 2.0 | Activity score that starts a burst.
Trade again only while activity >= this x normal | 1.5 | Score needed for the next trade of a burst; must not exceed the start level.
Best spread: trade only on a tick whose spread is the lowest of the last N seconds (0 = off) | 10 | Lowest-spread wait in seconds.
...and spread <= this x Q (Q = the usual lowest spread of a minute, last hour) | 2.0 | Spread gate as a multiple of Q.
Instant profit close: close as soon as the trade makes the amounts below | true | ON: target and instant close use the two amounts below.
...metals (gold, silver, ...): $ per 1.00 lot | 5.0 | Amount per 1.00 lot for metals, in the account currency.
...other symbols: $ per 1.00 lot | 1.0 | Amount per 1.00 lot for other symbols, in the account currency.
Target in points when instant close is OFF (0 = auto: $1 move on gold, 2xQ elsewhere) | 0 | Take profit in points when instant close is OFF.
Time stop: close at market after N minutes | 5 | Minutes before a trade is closed at market.
Trades per burst | 3 | Maximum trades in one burst, one after another.
Safety
Input (as shown) | Default | Meaning
Far safety stop loss at N x max(target, 2xQ) (0 = off) | 100 | Server stop loss distance as a multiple of the larger of target and 2 x Q.
Absolute spread cap in points (0 = off) | 0 | Extra fixed spread limit in points.
Quick start
- Open a chart of the symbol on a demo account. Any timeframe works.
- Turn on Algo Trading in the terminal and allow algorithmic trading in the EA's Common tab.
- Attach the EA and check the inputs. It starts ON and may trade at once; press the ON button to switch it OFF if you want to watch first.
- Read the start line in the Experts log: symbols, hedging or netting, settings, lot and switch state.
- Set the lot in the panel lot box and choose ALL or one symbol.
- Watch the symbol rows: activity score, state, and spread against the maximum.
- To stop, press ON/OFF (new trades only), or press "Close all + stop" twice within 3 seconds to close this chart's positions and switch OFF.
Recommended use
Use it on a demo account or in the Strategy Tester to study activity bursts and spread behaviour on your broker. Test with "Every tick based on real ticks" and with your broker's real spreads and commission before any other use. We do not recommend live trading with the default settings, because they lost money in every backtest that placed trades. If you trade it with real money at all, use the smallest lot and only money you can afford to lose.
FAQ
Q: Does it guarantee profit?
A: No. The default settings lost money in every backtest that placed trades, and no stop, target or time-stop variant we tried changed that.
Q: Why is the win rate high when the result is negative?
A: The target is tiny and the safety stop is at least 100 times farther away. Many trades win a little; a few lose a lot. In the gold backtest (Strategy Tester, hypothetical, not real trading) the average winning trade was +0.05 USD and the average losing trade -5.98 USD at 0.01 lot.
Q: Which symbols and timeframes can I use?
A: Any symbol your broker lets you trade, the chart symbol by default or a comma-separated list. The EA uses 1-minute data itself, so the chart timeframe does not matter.
Q: Does it use martingale, grid or averaging?
A: No. Every trade uses the same lot, and only one position per symbol is open at a time.
Q: Can I run it on several charts?
A: Yes, on different symbols. A second chart on a symbol that another chart already trades with the same magic number will not start; give it a different magic number.
Q: Why does it not trade?
A: The panel row gives the reason: quiet market, spread too wide, waiting for the lowest spread, news window, maximum positions open, lot below the minimum, OFF, or (netting) another position on the symbol. Refusals such as not enough margin or a closed session are printed in the Experts log once per day.
Q: Does it work on netting accounts?
A: Yes. It skips a symbol while another EA's or a manual position is open on it. Our backtests ran on a hedging account.
Q: How do I get support?
A: Through MQL5 private messages or the product comments.
Risk warning
Trading leveraged products such as forex, metals and CFDs carries a high risk of losing money and is not suitable for everyone. This EA lost money with its default settings in every backtest that placed trades, and its design of a very small target with a far safety stop means that rare single losses can be many times larger than a typical win. Backtests are hypothetical and do not represent real trading; live results also depend on your broker's spreads, commission, slippage, execution speed and connection. Test on a demo account first, use a lot size you can afford to lose, and do not trade money you need. The seller gives no investment advice and accepts no responsibility for trading losses.
