Decoding a Live Gold Grid Pattern into an MQL5 EA
10,800 deals and 14,721 orders from a running account analysed step by step to recover the grid, straddle and exit rules, then rebuilt as an EA.
Read-only history export, magic-number survey, basket and lot-ladder reconstruction, grid geometry and TP distance, straddle width and order types, tick-exact exit reconstruction and a threshold scan, documented in a findings file.

- Read-only export of 10,800 deals and 14,721 orders
- Nine-step analysis from magic survey to tick-exact exits
- Hard threshold proven over trailing on tick data
- Working EA rebuilt from the decoded rules
A trader wanted to know what strategy was really running on an account that showed thousands of gold trades under one magic number. The deal and order history was exported read-only from the terminal and analysed in nine numbered scripts, each answering one question: which of seven magic numbers is the live one, how positions group into baskets, whether the lot ladder follows a rule, the grid step and take-profit distance, the width and order types of the opening straddle, whether exits are hard take-profits or trailing, and the exact threshold at which cycles close.
An inconclusive first look at exits on 1-minute data was settled by reconstructing them tick by tick, which proved a hard threshold rather than a trail and pinned the number. The findings document lays out the decoded strategy with the evidence behind each rule, and the Expert Advisor rebuilds it so the behaviour can be tested in the strategy tester and compared against the original history.
Analysis of a trading account's history; shared as engineering work, not financial advice.
How it works
- Export account, deals, orders and open positions read-only
- Separate strategies by magic number and pick the live one
- Reconstruct cycles, baskets and the lot ladder
- Measure grid step, TP distance and straddle geometry
- Reconstruct exits on ticks and scan the threshold
- Implement and test the EA against the recovered rules
Software and automation are infrastructure, not financial advice. No performance guarantees. Every live system needs staged testing, risk limits, and owner approval.