Portfolio

Gold trend expert advisor

EMA-cross entries with RSI confirmation, trailing after one unit of risk, and a per-trade risk cap derived from the stop distance.

MT5 Personal trader Mehdi Rastegar Independent gold trader

Project specifications

Project specifications

Market
XAUUSD
TF
M15
Platform
MT5
Client type
Personal trader
Delivery window
8 weeks
Stack
MQL5, two-broker tick data, report spreadsheet
Strategy
Trend + EMA + RSI
Modules
Risk engine + trailing
Testing
Backtest + forward test

Who this was for

Mehdi Rastegar

Role
Independent gold trader
City
Isfahan
Project reference
TBT-1401-01
Trade flow

The client's idea

Mehdi Rastegar works XAUUSD on M15; the opening brief was: Turn my manual entry rules into a bot that manages the trade overnight without me.

Initial challenge

Late entries and inconsistent position sizes during manual M15 execution — worst in the Asian session, when the client is asleep.

Solution

EMA-cross entries with RSI confirmation, trailing after one unit of risk, and a per-trade risk cap derived from the stop distance.

Why this design

An EMA cross confirmed by RSI is exactly what the client had been executing by hand for years. It matches how XAUUSD is actually traded and can be tested against the data already available.

Safeguards and risk control

Per-trade risk is derived from stop distance, the daily loss cap is enforced in code, and the kill switch is independent of the signal logic.

Our next-step proposal

The next step for this project is a monthly performance report and an annual review of the XAUUSD filters.

Portfolio

Measured results

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

  • 11.8 % Max drawdown in test
  • 1,240 Trades reviewed
  • 14 months Test window
  • 0.4 pip Average execution slippage

Portfolio

How the delivery ran

Every project moves through these five phases, with the window for each agreed in the specification.

  1. Discovery and problem framing

    Completed

    Framing XAUUSD on M15 and reading back the client's written rules.

    Day 1–3

  2. Written specification

    Completed

    Turning the rules into codeable conditions: entries, exits, filters, sizing.

    Day 4–11

  3. Implementation

    Completed

    Building the signal engine, risk module and execution layer as separate, testable pieces.

    Day 12–33

  4. Testing and validation

    Completed

    Backtest, forward test and trade-by-trade review on XAUUSD data. A second run on the other broker's data, to measure the spread and execution gap.

    Day 34–47

  5. Handover and support

    Completed

    Handover of the source, the parameter document and a demo-account install.

    Day 48–51