Case studies

Case study: Trade copier panel

Copying trades by hand across six accounts produced size errors and delays on busy days.

  • EURUSD / GBPUSDMarket
  • M5TF
  • MT5Platform
  • 8 weeksDelivery window
  • 5Deliverables
Backtest and forward test method

The client's idea

Mehravard Account Management works EURUSD / GBPUSD on M5; the opening brief was: A panel that mirrors the master account's trades to client accounts at the right size ratio.

Project and starting point

Copying trades by hand across six accounts produced size errors and delays on busy days.

Solution architecture

A copier panel with an order queue, per-account size ratios, an exposure cap for each client and a full audit log.

The queue keeps one slow account from blocking the rest. It matches how EURUSD / GBPUSD is actually traded and can be tested against the data already available.

Why this design

The queue keeps one slow account from blocking the rest. It matches how EURUSD / GBPUSD is actually traded and can be tested against the data already available.

Implemented capabilities

Modules and components built: Order queue + size allocation.

Delivered output:
Trade copier panel — EURUSD / GBPUSD (M5)
Specification document and the rule-to-code mapping table
Full MQL5 source, commented
Test report: Concurrency test across four accounts
Parameter document and install guide (8 weeks)

Safeguards and risk control

New code lives in pure functions without hidden global state, and order-execution errors are caught and logged.

Backtest and forward test method

Test method: Concurrency test across four accounts.

Testing runs in three stages: a backtest on historical data, limited optimisation inside the contract's scope, and a forward run with the parameters frozen.

Tools and stack: MQL5, shared file, concurrency logs.

Every figure from this project is published together with its measurement conditions: the data window, the tick model, the spread, the commission and the build of the executable. Without them a number cannot be compared with anything.

Publishable results

Size differences between accounts went to zero and the team doubled the number of accounts under management.

Limitations and cautions

New code lives in pure functions without hidden global state, and order-execution errors are caught and logged.

Every test result depends on the quality of the historical data, the broker's spread and market conditions, and none of it is a promise about the future. Through a severe price gap or a broker disconnection a stop loss cannot be guaranteed, so behaviour in those conditions must be reviewed separately.

Our next-step proposal

The next step is automated tests over the calculation functions and documentation of the internal API.

Portfolio

Measured results

These are the figures the test produced — not a promise about future performance.

  • 120 ms Order round-trip time
  • 100 % Parity with the previous build
  • 99.6 % Runtime stability in test
  • 8 scenarios Scenario test coverage