intermediate moderate drawdown ~120 trades/mo

Scalping

Scalping names a holding time, not an entry idea, and the chart period does not set it — the exit distance does. What decides a scalper is the cost it must clear on every trade: at a 15-pip stop and 20-pip target, each pip of round-trip cost adds 2.9 points to the win rate needed to break even.

AIStrategyMiner EA Builder: a short-term RSI strategy with a fixed stop and target wired together from blocks

At a glance

What one pip of cost does to the win rate you need

Points added to the break-even win rate by each pip of round-trip cost. Rows are stop / target in pips: break-even = (stop + cost) ÷ (stop + target).

What one pip of cost does to the win rate you need Bar chart of the points one pip of round-trip cost adds to the break-even win rate: 10.0 at a 5 / 5 stop and target, 2.9 at 15 / 20, 1.1 at 30 / 60 and 0.67 at 50 / 100. 5 / 5 +10.0 15 / 20 +2.9 30 / 60 +1.1 50 / 100 +0.67

At a glance

One pip of cost, as a share of the target

Spread, commission and slippage do not shrink with the target. One pip is 50% of a 2-pip target, 12.5% of an 8-pip target and 1% of a 100-pip one.

One pip of cost, as a share of the target Bar chart of one pip of cost as a share of the target: 50% at 2 pips, 12.5% at 8 pips and 1% at 100 pips. 2 pips 50% 8 pips 12.5% 100 pips 1%

Mechanism

A scalping EA opens and closes within minutes, targeting a small move rather than a large one, and relies on a statistical edge repeated across many trades. Entry signals are fast-oscillator extremes, session-window patterns or micro-structure rebounds. Because the target is small, a fixed round-trip cost is a large fraction of it: at a 2-8 pip target, one pip of spread and commission is 12.5% to 50% of the whole trade. That fraction, not the holding time, decides whether the record survives contact with a real account.

Suitability

Requires an account whose total round-trip cost is small relative to the target — raw-spread pricing, low commission, and execution that does not widen at the moment the EA fires. Dense-liquidity windows matter for the same reason: the strategy is a bet that the cost stays below the edge. Unsuitable wherever spread widens on news or fills are slow, because the loss is not a bad trade but a permanent tax on every trade. Before trusting one, measure its holding time from the closed trades and its breakeven cost from a re-run with the spread raised.

Notes

Scalping is the only common strategy label named after a holding time. Every other label describes what the EA thinks — a trend, a reversion, a range. Scalping describes only how long it stays. That makes it the easiest label to apply to something that is not one, and the hardest to verify from a product description.

It also makes it checkable. Holding time is recorded on every closed trade, and the cost of each trade is known before it is placed. This page uses that arithmetic, and the Builder’s own measured short-term templates, to show what a scalper has to clear on every trade — and how to find the cost at which your own edge reaches zero.

How it works: the trade the label describes

A scalping EA takes a small move and repeats it. The entry can be almost anything — a fast oscillator at an extreme, a session-window pattern, a rebound off a short-term band — because the entry is not the distinguishing feature. What distinguishes it is the exit distance: a target close enough that the trade is over in minutes.

Two consequences follow, and only the first is usually stated.

The first is high trade frequency. Short holds mean more completed trades in the same period, which is the “volume game” framing most scalping descriptions use.

The second decides the outcome. A fixed cost is a variable fraction of a variable target. Spread, commission and slippage do not shrink because your target did. At a 2-8 pip target, a one-pip round-trip cost is 12.5% to 50% of the entire trade. The same pip against a 100-pip swing target is 1%. Nothing about the market changed between those two cases; only the denominator did.

That is the whole mechanism, and it is why execution quality is not a footnote for this strategy. It is also why the strategy is so often profitable in a backtest and not in an account: the backtest is where the denominator is honest and the numerator is optional.

What cost does to the win rate you need

The break-even win rate for a fixed stop and target, with a round-trip cost of c pips charged on every trade, is (stop + c) ÷ (stop + target). Winners net the target minus the cost; losers lose the stop plus the cost. It is arithmetic, and it shows exactly where scalping sits.

Stop / target (pips)Break-even, no cost1-pip cost2-pip costEach pip adds
5 / 5 (a typical scalp)50.0%60.0%70.0%10.0 points
15 / 20 (Builder Time Scalper)42.9%45.7%48.6%2.9 points
30 / 60 (Builder Stoch + BB, Envelope Reversal)33.3%34.4%35.6%1.1 points
50 / 100 (Builder trend templates)33.3%34.0%34.7%0.67 points

Read the last column first. A 5/5 scalper that wins 58% of its trades is profitable at zero cost and losing at one pip. A 50/100 trend rule barely notices the same pip. Cost sensitivity is a property of trade size, not of the entry. That is why scalping is genuinely more fragile than slower strategies, and why the reason is arithmetic rather than temperament.

+2.9 pointsBreak-even win rate added per pip of cost at 15/20
+0.67 pointsSame pip at a 50/100 stop and target
10%A 2.0-pip spread as a share of a 20-pip target

What the Builder’s short-term templates show at stock settings

The EA Builder prints a measured baseline on the template cards that have one. In our own stock-settings baseline of the Builder’s templates — a single USD/JPY M5 run over one year, default inputs, no optimisation — most finished below a 1.0 profit factor. The short-term templates are no exception.

Test conditions
SourceBaseline printed on each template card in the EA Builder
Symbol / timeframeUSD/JPY M5 (Exness MT5)
Period2025-06-01 – 2026-06-09
ModelM1 OHLC (bar-level, not real ticks)
Deposit / inputs10,000, template defaults, no optimisation
TemplateEntry and filtersStop / target (pips)Profit factorTrades
Time ScalperRSI 7 extremes, 08:00–11:00 server time, spread ≤ 20 points15 / 200.92396
Williams ScalperWilliams %R extremes, London session, spread ≤ 20 points, break-even at +1015 / 200.902,773
Stoch + BBStochastic 5/3/3 extreme at a Bollinger band30 / 600.96896
3-Strategy Portfolio (Scalping Cluster)The three above in one EA, each on its own magic numberas each part0.914,279

Three things follow.

Both scalper templates sit below 1.0, and the busier one did not do better. Williams Scalper took 2,773 trades — seven times Time Scalper’s 396 — and scored 0.90 against 0.92. The two differ in entry, trading window, lot size, break-even and position limit, so frequency is not the cause of the gap. But frequency multiplies whatever the per-trade result is: seven times the trades at a thin negative edge is seven times the loss, not more edge.

The spread filter is part of the cost, not a guard against it. Both scalper templates admit entries at up to 20 points. On a three-digit USD/JPY quote that is 2.0 pips, or 10% of the 20-pip target before commission and slippage. For Time Scalper’s plain 15/20 exit, the table above shows that alone lifting break-even from 42.9% to 48.6%; Williams Scalper’s break-even exit changes the loss side, but not the cost. A filter that admits a spread the edge cannot pay for is not protecting the strategy.

Clustering short-term methods does not dilute the cost. The three-method portfolio scores 0.91 over 4,279 trades, with a -4.91% drawdown — deeper than any of its parts. Every leg pays the same spread in the same hours.

Market conditions: when the edge survives the cost

ConditionEdge survivesEdge does not
Spread at the moment of entryStable and raw-pricedWidening exactly when the signal fires
Cost as a share of the targetWell under the strategy’s own breakeven fractionAt or above it — the record is a rounding error
ExecutionFills at or near the requested priceSlippage that is small in pips but large against the target
SessionDense liquidity, tight and stable quotesRollover, news, thin hours — same pips, worse fills
Test configurationReal tick data, modelled commissionFixed average spread, commission omitted

The session argument in most scalping descriptions — trade the London open, trade the overlap — is really the cost argument in disguise. Those windows are recommended because quotes are tight and stable there, not because price behaves differently. When the spread doubles from one pip to two, a strategy targeting eight pips has lost a quarter of its trade before it starts; a strategy targeting eighty has lost 2.5%.

This is also the honest reason to be sceptical of a scalping backtest before looking at anything else. A test with a fixed average spread and no commission has removed the variable that decides the strategy. It flatters most exactly the EAs whose targets are smallest.

Parameters and settings in MT5

In the Builder each of these is a block or an input, and every value becomes an input in the compiled EA.

Block and inputWhere the risk sitsWhat it controls
Open Buy / Open Sell TP (pips)The denominator of everythingThe target; halving it doubles cost as a share of the trade
Spread Filter Max Spread (points)The one input that must not be optionalBlocks entries when the quote is too wide to leave an edge
Slippage (compiled input, default 3)Silent when set too generouslyHow far the fill may move before the order is refused
Session Filter / Session (auto DST)The cost argument in disguiseRestricts trading to hours where quotes are tight, with DST handled for you
Time Exit Close after N minutes heldTurns a label into a ruleCaps holding time so the EA is a scalper by construction
Cooldown Filter / Daily Trade LimitCheap protectionStops one signal firing repeatedly through a single wide-spread moment

Three MT5 realities decide whether a short-hold record survives:

  • The tester’s spread model is the experiment. SYMBOL_SPREAD_FLOAT tells you whether the symbol floats; a run configured with the current fixed spread measures a market that does not exist. Use real tick data and read the modelling quality before reading the profit.
  • The stop level bounds how tight a target can be. SymbolInfoInteger(symbol, SYMBOL_TRADE_STOPS_LEVEL) is the minimum distance the broker accepts for stops and targets. A target inside that distance cannot be placed as designed. The Builder’s Virtual/Hidden SL/TP block closes at market on internal levels instead, which avoids the rejection but turns every exit into a market order with its own slippage.
  • Commission is not in the profit column by default. Read HistoryDealGetDouble(ticket, DEAL_COMMISSION) and include it, along with DEAL_SWAP, when computing per-trade results. On a small target the commission is often larger than the edge.
  1. Take the EA’s closed-trade list and compute the median holding time. That number, not the chart period, tells you whether you are looking at a scalper.
  2. Write down the stop and target, and compute the break-even win rate at zero cost and at your broker’s real round-trip cost.
  3. Convert your broker’s cost — spread plus commission plus expected slippage — into pips, and compare it with the target.
  4. Re-run the backtest with the cost raised until net profit reaches zero. That breakeven cost is the most useful single number about the EA.
  5. Only then compare targets. A tighter target raises the win rate and the cost share together, and the second effect decides the account.

Failure modes: how a scalping EA loses money

  • The cost is a larger share of the target than the edge is. The dominant path, and the one that does not appear in an unmodelled test. It is not a losing streak; it is a constant subtraction.
  • The spread widens where the EA trades. Signals that fire on volatility arrive with the quote at its worst. Testing on average spread hides precisely the fills that matter.
  • Slippage measured in pips looks small. Half a pip is unremarkable against a 100-pip target and ruinous against a four-pip one. The absolute number is the wrong unit.
  • The target is tightened to raise the win rate. It works, and it moves the strategy toward the fragile end of the cost table. A rising win rate and a falling edge often arrive together.
  • More trades are mistaken for more edge. Frequency multiplies whatever the per-trade result is, including a negative one; Williams Scalper’s 2,773 trades did not beat Time Scalper’s 396.
  • The chart period is treated as the holding time. An M5 rule with wide exits is not a scalper, and it will not behave like one.

How to test a scalping EA in AIStrategyMiner before it costs anything

The useful test is not whether a scalping rule is profitable in a clean backtest. Many are, because the clean backtest is where the cost was removed. The useful test is where the profit reaches zero as cost rises, and how far that point sits from your broker’s real number.

  • Load Time Scalper or Williams Scalper, or build your own entry, and set the stop and target you actually intend to trade.
  • Press Measure with the spread set to your broker’s typical value in points, then again at double and triple that value, and note where the profit factor falls through 1.0.
  • Run the Robustness matrix to see the same flow on EUR/USD, USD/JPY, GBP/USD and AUD/USD — a scalping edge that exists on one pair only is usually a cost artefact.
  • Confirm in the MT5 Strategy Tester on real ticks with commission modelled, since the Measure panel is an approximate check.
  • Add a Time Exit if the rule is meant to be a scalper, so the holding time is enforced rather than hoped for.

The .ex5 compiled from your own flow is free. The .mq5 source is part of Pro, a one-off purchase with no subscription — see pricing if you want to edit the generated code. The site’s methodology sets out how backtest results should be read.

Scalping versus the slower strategies

ScalpingTrend and mean reversion
What the label namesA holding timeAn entry idea
Typical holdMinutes, by definitionHours to days
One pip of cost12.5%–50% of a 2-8 pip targetAbout 1–2% of a 50-100 pip target
Break-even added per pip2.9–10 points at 15/20 to 5/50.67–1.1 points at 50/100 to 30/60
What a backtest omitsThe variable that decides itA second-order correction
What to read firstBreakeven costWorst losing run

The comparison is not an argument that scalping cannot work. It is an argument about what has to be true for it to work, and about where to look. For a trend or mean-reversion EA, the number that decides whether you can hold the position is the worst losing run. For a scalper it is the breakeven cost, because the run that ends it is not a run of bad trades — it is the spread, charged on every good one.

Find your own cost limit before you trust a scalper

Build the entry from blocks in AIStrategyMiner Builder, add a Spread Filter, then raise the spread in Measure step by step on the same flow. The cost at which the result reaches zero is the number that matters, and you can read it before funding anything.

  • Compile a standard .ex5 file for MetaTrader 5 and confirm it in the Strategy Tester on real ticks with commission.

Check the finished EA in MetaTrader 5 before you trust it. The numbers on this page come from what you typed; they are not a forecast of results.

AIStrategyMiner EA Builder: strategy blocks wired together on a canvas, with the properties panel on the right

Typical pairs

Where this strategy works best

Related articles

Frequently asked questions

What is a scalping EA?
A scalping EA is an expert advisor that holds each position for a short time — minutes rather than hours — and takes a small move instead of waiting for a large one. It is the only common strategy label named after a holding time rather than an entry idea, which is why it is so easy to misapply. Nothing about the entry logic makes an EA a scalper; the exit distance does. To know whether a given EA is one, measure how long its closed trades were actually open.
Does an M5 or M1 EA mean it is a scalper?
No. The chart period sets how often the EA evaluates its rule, not how long it stays in a position. An M5 EA with a wide stop and a distant target can sit in one trade for days, and an H1 EA with a 10-pip target can be in and out within the hour. Read the holding time from the closed-trade list, never from the timeframe in the name. If you want a hard limit, a Time Exit block closes positions after a set number of minutes or bars.
Why is spread such a large problem for scalping?
Because the cost is fixed and the target is not. A round-trip cost of one pip is 12.5% of an 8-pip target and 50% of a 2-pip target. It also moves the win rate you need: with a 15-pip stop and a 20-pip target, break-even rises from 42.9% at zero cost to 45.7% at one pip and 48.6% at two. With a 50-pip stop and a 100-pip target, the same pip moves break-even by only 0.67 points. The smaller the trade, the more of it the cost owns.
What spread filter should a scalping EA use?
One set in points, just above the symbol's normal spread in the hours you trade, and never larger than the edge can absorb. The Builder's two scalper templates cap entries at 20 points. On a three-digit USD/JPY quote that is 2.0 pips — 10% of their 20-pip target on the entry spread alone. Read the symbol's digits before copying a points value from another pair: 20 points is 2 pips on USD/JPY and on five-digit EUR/USD alike, but 20 points on a two-digit index is a different number entirely.
Do I need a VPS and a raw-spread account to run a scalping EA?
You need whatever keeps total round-trip cost small relative to the target, which usually means raw or ECN pricing with low commission, and execution that does not degrade when the EA fires. A VPS close to the broker reduces latency and therefore slippage, which is part of the same cost. Treat all of it as one number — spread plus commission plus slippage — and compare it to the size of the move the EA is trying to capture.
How do I test whether a scalping EA survives real costs?
Run it with realistic spread and commission modelled, then re-run it with the cost raised and see where the net result reaches zero. That breakeven cost is the single most useful number about a short-hold EA, and it is knowable before funding anything. In the Builder, the Measure panel takes a spread in points, so raising it step by step on the same flow gives a first estimate; confirm the result in the MT5 Strategy Tester on real ticks with commission.