On this page
An EA pays more than the spread shown in Market Watch. The relevant figure is the total cost produced by the strategy’s position size, holding time, trade frequency and execution quality. A fair comparison puts every cost into the same unit.
The five costs an EA can face
| Component | When it applies | Why it varies |
|---|---|---|
| Spread | Through the Bid/Ask prices used to open and close. | Symbol, account, session, news and liquidity. |
| Commission | Per side or round turn, often per lot. | Account type, volume tier and currency conversion. |
| Swap / financing | When a position remains open across rollover. | Direction, instrument, day and broker schedule. |
| Slippage | When the fill differs from the requested price. | Volatility, liquidity, size, latency and routing. |
| Other charges | Depending on broker and account. | Inactivity, data, conversion or withdrawal policy. |
For strategy analysis, separate trading costs from non-trading charges. A withdrawal fee affects the account owner, but it does not change the expectancy of each signal. Spread, commission, swap and slippage do.
Costs should be measured under the account’s actual broker execution conditions. If realized costs keep departing from the assumptions used to validate an EA, include that evidence in live drift monitoring rather than explain the entire difference as a weaker signal.
For multi-session holding, use the swing-trading guide on H4/D1, holding costs and gap risk to connect the decision clock with position size and the actual account ledger.
For a detailed holding-cost check, use the Forex swap and rollover guide to connect the quoted unit, financing calendar and account-currency ledger before interpreting net results.
Convert costs to one comparable unit
Choose account currency, pips, points or money per standard lot and convert every component consistently. Check the symbol’s contract size and tick value instead of assuming that one pip has the same monetary value on every pair and account currency.
Estimate total trade cost from the spread impact at the actual entry and exit prices, round-turn commission, swap for the holding period and net slippage. Do not add a full spread twice or subtract it again from profit already calculated from the executed Bid/Ask prices. Use observed values rather than advertised minimums.
If commission is quoted per side, double it for a complete open-and-close cycle. If the EA scales into several positions, count every ticket. For partial closes, verify how commission and financing are applied in the actual account history.
Match the cost model to the EA
A high-frequency or short-target EA is usually more sensitive to spread and slippage. A swing system that holds for days may be more sensitive to swap. A grid strategy can accumulate spread, commission and financing across several simultaneous tickets, so cost should be evaluated at basket level as well as per trade.
Focus on spread distribution, fill quality and commission per round turn.
Model long/short swap and the broker’s triple-swap schedule.
Add costs across the full basket and peak exposure.
Cost sensitivity should be tested before optimizing entry rules. A backtest built with an unrealistically low fixed spread can make a fragile strategy appear robust.
Build a representative cost sample
- Collect typical spreads during the exact hours the EA trades.
- Include rollover, session open and news only if the EA can trade there.
- Export commission and swap from closed live or demo trades.
- Calculate requested-versus-filled price for entries and exits.
- Group results by symbol, session, direction and lot size.
- Stress the model with worse-but-plausible costs before risking capital.
Use median values for a normal-case model and upper-percentile adverse values for a stress case. The goal is not to predict every fill, but to learn whether the strategy still has room after realistic friction.
A fair account comparison workflow
Do not choose an account on cost alone. Platform stability, regulatory protections, withdrawal reliability and the broker’s execution policy remain separate requirements.
A hypothetical round-turn cost calculation
Assume a USD account and a standard EURUSD contract where a pip is worth $10 per lot. The following inputs are educational assumptions, not broker quotes or measured EA results.
| Component | Cost per lot | Pip equivalent |
|---|---|---|
| Spread: 1 pip | $10 | 1.0 |
| Round-turn commission | $7 | 0.7 |
| Net adverse slippage: 0.2 pip | $2 | 0.2 |
| One rollover, swap credit | −$1 | −0.1 |
| Total modeled cost | $18 | 1.8 |
At 0.10 lot, this modeled total is $1.80. A swap credit reduces cost; a debit increases it. State whether slippage covers entry, exit or their signed total. Actual spreads and financing depend on the trade’s timing and direction.
Reconcile executed profit without subtracting costs twice
For a selected MT4 order, OrderProfit() excludes commission and swap. Add their signed values to obtain that order’s net result: OrderProfit() + OrderCommission() + OrderSwap(). Illustrative figures are $12.00 − $0.70 − $0.10 = $11.20.
Spread and fill slippage are already reflected in profit calculated from actual executed prices. Do not subtract the modeled spread or slippage again from that result. Reconcile any separately posted fees against the account ledger, and aggregate every relevant ticket when evaluating a basket.
The official OrderProfit reference states which charges are excluded.
Compare two account offers over the same holding period
The following figures are hypothetical inputs for a standard EUR/USD contract and a USD account. They are not current broker prices. Assume a pip value of USD 10 per standard lot, an unchanged spread during the illustrative round trip and no additional slippage.
| Cost input per standard lot | Account A | Account B |
|---|---|---|
| Spread | 1.2 pips = USD 12 | 0.3 pip = USD 3 |
| Round-turn commission | USD 0 | USD 7 |
| Entry/exit cost before financing | USD 12 | USD 10 |
| Assumed financing debit per charge unit | USD 2 | USD 3 |
| Total with three charge units | USD 18 | USD 19 |
For a 0.10-lot position, the pre-financing figures scale to USD 1.20 and USD 1.00. After the assumed three charge units, they become USD 1.80 and USD 1.90. Account B is cheaper for the first comparison, while Account A is cheaper for the second.
12 + 2h = 10 + 3h → h = 2 charge units
Both offers cost USD 16 per standard lot when h is 2 in this model. A charge unit is the assumed unit of financing, not necessarily one calendar night. A broker’s multi-day rollover can charge several units in one event. Replace the teaching inputs with the actual long or short rate, instrument, calendar and account-currency conversion.
The example isolates the reason an account comparison can change with holding time. It does not establish that one pricing model is generally better. If an account has different fills, a minimum commission or tiered charges, those conditions must be added before comparing the totals.
State the price benchmark before adding a spread cost
A calculation from hypothetical mid-prices needs an explicit allowance for trading at executable Bid and Ask prices. A calculation from actual entry and exit fills has already incorporated that effect. These are different starting points.
For an unchanged spread, a buy opened at Ask and closed at Bid with an unchanged mid-price loses one spread. When the spread changes, its effect relative to a mid-price path depends on both ends of the trade: half the entry spread plus half the exit spread. Do not add two full spreads to the same completed round trip.
Other backtest conventions can use Bid-based bars and reconstruct Ask at entry or exit. Read that convention before adding a generic spread estimate. A net result taken from executed prices should instead be reconciled with the signed commission, swap and any separately posted fees.
Keep a price-based model and an account-ledger check as separate calculations. Their purpose is reconciliation. Subtracting the modelled spread and slippage again from executed-price profit makes the account appear more expensive than the actual record shows.
Sample the costs at the times the strategy makes decisions
A daily average of quotes can describe the market feed, yet still be a poor estimate of an EA’s trading costs. A strategy that enters near a session change observes a different set of quotes from one that trades mainly in liquid daytime hours. Sample candidate entry times as well as filled trades.
If a maximum-spread rule rejects a candidate, retain that observation as a skip with its reason. Estimating costs only from accepted trades excludes the expensive observations that the rule removed. Conversely, charging every rejected candidate a completed round-turn fee invents trades that did not occur.
For a stress comparison, change a stated cost input while holding the signal rule fixed. Report which candidates would become ineligible and which accepted trades face a worse fill or higher financing charge. Do not present a convenient average-cost adjustment as an exact reconstruction of a different broker’s history.
For pairs whose quote currency differs from the account currency, check the conversion used for pip value, commission and financing. The USD 10-per-pip convention in the examples is a stated EUR/USD assumption, not a rule for every symbol.
Frequently asked questions
Does a zero minimum spread mean a free trade?
No. Compare the spread actually available when the EA trades, any commission, financing and execution differences. A minimum is not a typical round-turn cost.
Should I subtract the spread from MT4 order profit again?
Executed-price profit already reflects the Bid/Ask prices used for the fills. Add signed commission and swap, and reconcile any separately posted fees; do not subtract the same spread twice.
Can a lower-spread account cost more over several days?
Yes, if its commission, financing or other applicable costs outweigh the spread difference. Compare the same position and holding period.
Official reference
The MT4 Contract Specification displays spread, contract size, tick value, volume limits, swap and trading sessions supplied by the broker. Treat those fields and the account’s actual history as the starting data for your calculation.