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
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.
-
Discovery and problem framing
CompletedFraming XAUUSD on M15 and reading back the client's written rules.
Day 1–3
-
Written specification
CompletedTurning the rules into codeable conditions: entries, exits, filters, sizing.
Day 4–11
-
Implementation
CompletedBuilding the signal engine, risk module and execution layer as separate, testable pieces.
Day 12–33
-
Testing and validation
CompletedBacktest, 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
-
Handover and support
CompletedHandover of the source, the parameter document and a demo-account install.
Day 48–51