The client's idea
Bahman Kashani works USDJPY on M30; the opening brief was: Trade only the Tokyo session, and never hold anything over the weekend.
Project and starting point
Yen positions were carried into the weekend, and the Sunday gap undid the week's work.
Solution architecture
A Tokyo-only rule, a timed exit before the session ends, and a forced close ahead of market holidays.
The timed exit is part of the strategy rather than a Friday-afternoon decision. It matches how USDJPY is actually traded and can be tested against the data already available.
Why this design
The timed exit is part of the strategy rather than a Friday-afternoon decision. It matches how USDJPY is actually traded and can be tested against the data already available.
Implemented capabilities
Modules and components built: Session calendar + holiday close.
Delivered output:
Tokyo session expert — USDJPY (M30)
Specification document and the rule-to-code mapping table
Full MQL5 source, commented
Test report: Three-year test
Parameter document and install guide (7 weeks)
Safeguards and risk control
Each module can be switched off on its own, and the exposure cap and daily stop are part of the expert rather than a later add-on.
Backtest and forward test method
Test method: Three-year test.
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, yen-pair M1 data, holiday calendar.
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
No position reached a holiday during the test, and the client's weekly report no longer contained gaps.
Limitations and cautions
Each module can be switched off on its own, and the exposure cap and daily stop are part of the expert rather than a later add-on.
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 proposed next step is a reporting module wired into the trade journal.
Portfolio
Measured results
These are the figures the test produced — not a promise about future performance.
- 1 Sessions controlled
- 540 Trades reviewed
- 8.7 % Max drawdown in test
- 3 years Test window