Trading costs

Forex Swap and Rollover: A Trading Bot Cost Checklist

Four connected checks for a forex bot: direction, swap units, rollover calendar and reconciliation with the account statement.

A forex bot can choose the expected direction and still produce a disappointing net result. One reason is that the trade remains open across a financing cut-off. Swap then becomes part of the trade's economics, alongside spread, commission and execution differences. For a strategy that holds several positions, small recurring charges can become a material cost.

This guide shows how to build a rollover cost sheet for a trading robot. The calculations below are deliberately hypothetical, not broker quotes or New Hope performance figures. The useful outcome is a repeatable checking process: identify the applicable terms, estimate the cash effect, and reconcile it with the statement.

A financing estimate is useful only when its units, timing and actual booking agree. No universal broker rate is assumed.

What forex swap means for an automated strategy

Swap is a debit or credit associated with keeping an eligible position open across the broker's financing boundary. It is different from the spread paid through execution prices and from an explicit trading commission. A positive number is not automatically available on the opposite direction of a negative one; examine the actual long and short terms separately.

For orientation, OANDA Corporation's financing explanation describes a 5 p.m. New York cut-off, direction-specific rates and calendar adjustments. Those are that entity's published terms, not a universal setting for every account. Your broker, legal entity, instrument and account type determine the relevant rules.

Build a specification snapshot before calculating anything

Write down the exact symbol name, including its suffix, rather than simply “EURUSD.” Two similarly named instruments may have different contract settings. Save the broker server, account currency, account type, long rate, short rate, calculation unit, financing cut-off and applicable calendar. Date the snapshot: a calculation without a reference date is difficult to investigate later.

In MetaTrader, check the instrument specification and the broker's financing terms together. MetaQuotes documents several swap calculation modes, including points, money in different currencies and annual percentage models. A raw swap number therefore has no reliable cash meaning until its unit and conversion basis are known.

Field

Why it matters

Example record

Direction and volume

The applicable rate and exposure depend on them

Long, 0.40 lots

Rate unit

A point is not automatically one dollar

USD per lot per charged day

Calendar multiplier

One boundary can represent several financed days

1, 3, 1

Booking currency

Conversion may be necessary

USD account; no conversion in this example

A worked example: three boundaries, five charged days

Assume a fictional USD-denominated account charges USD 6.50 per lot for one financed day on a long position. A bot holds 0.40 lots across three boundaries whose multipliers are 1, 3 and 1. Keep the direction and volume unchanged to isolate the arithmetic.

The estimated financing amount is 0.40 × (−6.50) × (1 + 3 + 1) = −USD 13.00. There are three observed boundaries but five charged days. If the same example used 1.20 lots, the estimate would be −USD 39.00. This is exposure scaling, not evidence that a strategy is unprofitable.

Now suppose trading produced USD 48 before commission and financing, while a separate commission line totals USD 7. The result after those two additional items is 48 − 7 − 13 = USD 28. Spread and slippage must not be subtracted again if that USD 48 already comes from actual opening and closing prices. The accounting definition of each input matters as much as the formula.

Why “triple swap is Wednesday” is not a complete rule

Do not make a bot's calendar depend on a weekday remembered from a different broker. Instrument schedules, holidays and account terms can change the number of financed days at a boundary. MT5 symbol properties include a triple-rollover day and daily swap multipliers. Check what the connected server actually reports, then confirm unusual dates with the broker.

Your operating record should show both broker time and a reference time zone. If the VPS clock, platform display and financing schedule use different zones, “close before midnight” is ambiguous. Daylight-saving changes make a fixed local alarm particularly fragile. Record an explicit cut-off, its time zone and the date for which it applies.

Should a bot close and reopen to avoid financing?

Not by default. Closing and reopening changes the trade and introduces another execution sequence. The comparison should include the incremental round-trip costs, possible price movement while flat, rejected orders and the strategy's rules. A lower financing bill can coexist with a worse total result.

Consider another hypothetical case. Holding costs USD 9 at the next boundary. Closing and reopening adds an estimated USD 8 of execution and commission costs before any adverse market movement. The apparent saving is only USD 1 and is uncertain. If the reopening order fails, the strategy's exposure also changes. A financing-only comparison misses that operational consequence.

For the surrounding trade evidence, use our execution audit checklist. If the second order is rejected, the correct response depends on the response code and current account state, as explained in trading bot order rejections.

Hedged positions do not imply zero financing

A buy and a sell may partly offset price exposure while still creating separate cost obligations. Build the cost sheet from the actual positions and applicable directions. Do not calculate financing from net directional exposure unless the account's rules explicitly call for it.

For example, a fictional long leg costing USD 4 and short leg crediting USD 1 produce a net USD 3 debit for the relevant period. If both legs are charged, their costs add together. Whether the platform maintains separate positions or one net position changes the inventory you need to inspect; our MT5 hedging versus netting guide explains that distinction.

Put realistic financing into the test record

Start by identifying which simulated trades cross the financing boundary. Add a cost assumption for each relevant direction and holding period, then disclose where historical terms are unavailable. Reusing today's swap rate for several years of data is an assumption, not a reconstruction of what every historical trade would have paid.

Keep a base estimate and a deliberately less favourable financing scenario. Compare whether the interpretation changes, especially for long holding periods or concentrated exposure. Record the assumptions beside the result rather than presenting one precise figure that hides uncertain inputs. Price-data quality still matters; see tick data versus candles in backtesting.

Reconcile estimated swap with the statement

  1. Choose one closed trade with a known position size and uncomplicated history.

  2. Record every financing boundary it crossed, including the applicable multiplier.

  3. Calculate the estimate in the correct unit and currency.

  4. Compare it with the platform history and the broker's statement.

  5. Investigate the difference before generalising the formula to all positions.

If an amount differs, check the rate date, position-size changes, currency conversion, rounding, holidays and separate adjustment entries. Keep commission, trading profit and financing in distinct columns. Do not silently change a rate just to make the spreadsheet match. Explain the cause or mark the difference unresolved.

A useful monthly review

Group financing by symbol, direction and holding period. Compare total cost with actual exposure and time held, not only with the number of winning trades. A few unusually long positions can dominate a month's financing. Review them individually before concluding that every instrument needs new settings.

Also compare closed results with remaining open exposure. The balance versus equity guide helps keep that distinction visible. A neat closed-trade summary does not explain what an open position may cost if it remains active through another boundary.

Discuss the setup with New Hope

When reviewing an NH PRO setup, bring the broker server, exact symbol, account type and current specification to the conversation. They are more useful than a screenshot showing only the final profit number. Confirm how the selected strategy handles overnight exposure and which settings apply to your configuration. Financing-aware preparation improves the quality of the decision; it does not guarantee a trading result.

Get our presentation about New Hope PRO and CRYPTO

Get our presentation about New Hope PRO and CRYPTO

Get our presentation about New Hope PRO and CRYPTO