Engineering notes

Engineering note · Broker execution contract

Why the Same EA Can Behave Differently at Another Broker

Separate symbol rules, spread, fill policy and rejected-order behavior from strategy logic before comparing one EA across brokers.

8 minute read
Broker execution contract comparing symbol specification, spread, fill policy and rejection handling
Strategy logic is only one input. The broker execution contract decides whether the same request is valid, fillable and repeatable.

Buyer question

Why does the same EA behave differently after moving to another broker?

First boundary

Freeze symbol and execution assumptions before changing the strategy.

Acceptance rule

One signal is comparable only when both runs expose the same requested order and every broker-side difference.

The complete answer

Identical source code does not create an identical execution environment. An Expert Advisor decides from the prices and symbol properties exposed by its terminal, then submits an order under that broker's validation and filling rules. Change any of those inputs and the observable trade sequence can change without a defect in the signal rule.

The clean comparison starts with one frozen strategy decision: symbol, direction, requested volume, entry rule, stop rule and decision timestamp. Each run must then record the broker-specific values used to validate and execute that request. Without that evidence, a different trade count or entry price cannot be assigned safely to strategy logic, data, transaction cost or order handling.

Freeze the broker execution contract

Treat these values as test inputs, not background details. Export them at startup and again when the terminal reports a change. Store them beside the order decision so a comparison can be reproduced later.

BoundaryEvidence to freezeWhy it changes the result
Symbol rulesTick size, tick value, contract size, volume minimum and step, stop and freeze distanceThe same requested order can be valid at one broker and rejected or rounded at another.
Transaction costBid, ask, spread, commission and swap conventionA strategy can cross its entry or exit threshold at a different effective price.
Fill policyMarket execution, allowed filling modes, partial fills and price deviationThe order path can change even when the signal timestamp is identical.
Failure behaviorError code, retry rule, backoff, reconciliation key and terminal stateA hidden retry or silent parameter change turns one decision into a different experiment.

Warning signs in a weak comparison

  • The test compares account profit but does not expose the requested and accepted prices.
  • Volume or stop values are rounded automatically and the changed request is not logged.
  • A rejected order is retried with different parameters without a stable decision identity.
  • The two terminals use different symbol suffixes, sessions or contract sizes.
  • Spread, commission and swap are collapsed into one unexplained result number.
  • Historical data and live execution are discussed as if they were the same boundary.

Three acceptance tests

Run these before editing strategy logic. Each test has one declared input and one observable pass condition.

1

Symbol-spec validation

Input: Send the same declared entry against two recorded symbol specifications.

Pass: The log records tick size, volume step, stop distance and the exact validation result before submission.

2

Bounded execution-cost scenario

Input: Replay one frozen signal under a declared spread and slippage allowance.

Pass: Requested price, accepted price, spread, commission and total execution cost are reported separately.

3

Invalid-request rejection

Input: Force one invalid stop distance and one invalid volume step.

Pass: Both requests end in a recorded rejection. The EA does not silently change the order or retry without a named rule.

What belongs in scope

A useful repair or port freezes the target platform and version, exact symbol mapping, volume and price precision, stop-distance rules, allowed fill modes, spread and deviation limits, commission model, session and time-zone rules, and the terminal states for every rejection. The source code must be authorized and the acceptance run must stay on demo or replay unless live-account operation is separately controlled by the owner.

Keep strategy changes outside the first comparison. If the EA needs a new entry rule, risk rule or retry policy, specify that as a separate change after the original behavior is measured. Mixing an execution repair with a strategy rewrite removes the baseline needed to show what was fixed.

Write the execution assumptions before comparing results

The free Scope Builder turns platform, symbol, order-state and acceptance assumptions into one reviewable brief. Use it to separate strategy logic from the broker boundary before commissioning a repair or migration.

Build the free scope brief

Trading risk disclosure

Futures and forex trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing one's financial security or lifestyle. Only risk capital should be used for trading, and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results.

Hypothetical performance disclosure

Hypothetical performance results have many inherent limitations. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown. There are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. Hypothetical results are generally prepared with the benefit of hindsight, do not involve financial risk, and cannot completely account for the impact of financial risk in actual trading. Market conditions, the ability to withstand losses, and adherence to a trading program can all materially affect actual results.

NinjaTrader trademark disclosure

NinjaTrader® is a registered trademark of NinjaTrader Group, LLC. No NinjaTrader company has any affiliation with the owner, developer, or provider of the products or services described herein, or any interest, ownership or otherwise, in any such product or service, or endorses, recommends or approves any such product or service.

Testimonials, when shown, may not represent the experience of other clients and are not a guarantee of future performance or success. Virtual-currency trading carries additional risks. See the CFTC customer advisories. Read the full financial risk disclaimer.