Case studies

Case study: Legacy indicator port to MT5

The MT4 build leaned on limited buffers and legacy functions; a naive port would break colours and alerts.

  • GBPUSDMarket
  • M15TF
  • MT4 / MT5Platform
  • 6 weeksDelivery window
  • 5Deliverables
Backtest and forward test method

The client's idea

Mohammadreza Fathi works GBPUSD on M15; the opening brief was: An indicator I wrote ten years ago must draw and calculate the same on MT5.

Project and starting point

The MT4 build leaned on limited buffers and legacy functions; a naive port would break colours and alerts.

Solution architecture

Buffers rewritten for the MT5 model, the original formula kept exact, colour rendering rebuilt and alerts moved to the new notification system.

The original formula was preserved line by line so the client's numbers do not shift. It matches how GBPUSD is actually traded and can be tested against the data already available.

Why this design

The original formula was preserved line by line so the client's numbers do not shift. It matches how GBPUSD is actually traded and can be tested against the data already available.

Implemented capabilities

Modules and components built: Coloured buffers + alerts.

Delivered output:
Legacy indicator port to MT5 — GBPUSD (M15)
Specification document and the rule-to-code mapping table
Full MQL4/MQL5 source, commented
Test report: Numeric output compared across builds
Parameter document and install guide (6 weeks)

Safeguards and risk control

The old build is not removed from the live account until the MT5 results match it.

Backtest and forward test method

Test method: Numeric output compared across builds.

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: MQL4 and MQL5, M15 data, a comparison report.

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

Numeric output comparison showed no difference, and the indicator draws the same familiar picture on MT5.

Limitations and cautions

The old build is not removed from the live account until the MT5 results match it.

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 reviewing behaviour under missing data and server reconnects.

Portfolio

Measured results

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

  • 100 % Parity with the previous build
  • 5 Defects fixed
  • 0 Regressions caught
  • 4,800 Bars in the test set