Structure Desk
- Experts
- Version: 2.0
- Activations: 20
An expert advisor for XAUUSD on MetaTrader 5. It works one basket at a time: it opens in a fixed set of server hours, adds to the position while price moves against it, and closes the whole basket together. There is no stop loss and no take profit on individual positions.
How It Trades
- One symbol, XAUUSD, one basket at a time, up to 5 orders in the same direction.
- Entries are allowed only in fixed server hours, and only when price sits at the edge of its four-hour range. Entries are blocked between 14:00 and 22:00 server time.
- While price moves against the basket, the expert adds orders at a fixed distance in dollars, with a pause of at least 60 seconds between them.
- The basket is closed as a whole: by a target in account currency, by a price target that depends on the entry hour, or by a trailing giveback after the target is armed.
- Order volume scales with the account balance. The added orders keep the same volume: there is no multiplier.
- The expert ships ready to run: the default inputs are exactly the settings every figure below was measured on, hourly targets and steps included. Nothing has to be loaded from a settings file.
Protection Built In
Three limits are on out of the box, and each can be switched off.
- WeekendFlatHour = 21 - close the basket and stop entries on Friday at 21:00 server time, so nothing is carried over the weekend. Gold gaps over a weekend: in the last 1100 trading days a gap of 40 USD or more happened 5 times and every one of them was a weekend gap.
- BasketStopBalancePercent = 80 - close the basket when its floating loss reaches 80 percent of the account balance.
- BasketMarginStopLevel = 100 - close the basket when the account margin level falls to 100 percent, which is the broker margin call line.
- AddRespectsEntryHours = true - no averaging inside the hours where new entries are forbidden.
The Friday flat fires every week by design. The balance and margin limits did not fire in any window used in testing - two continuous half-years, seven separate months kept out of tuning and a thirteen-month pool, 22 windows in total. They are there for a tail the tests did not contain.
What The Tests Show
Strategy Tester, 100 percent real ticks. Account of 2500 USD, leverage 1:500, default settings, run continuously with no resets between windows.
- 2025.03.01 to 2025.10.31: net result +104.51 percent, maximum equity drawdown 14.98 percent, 870 trades.
- 2025.11.01 to 2026.06.30: net result +185.24 percent, maximum equity drawdown 32.30 percent, 905 trades.
- 2026.07.01 to 2026.09.17: net result +31.27 percent, maximum equity drawdown 18.33 percent, 278 trades.
All three windows are shown, the weakest one included. The screenshots carry the report figures as the tester produced them, drawdown line included.
Requirements
- MetaTrader 5, hedging account, XAUUSD.
- Leverage 1:500 was used in all tests. Lower leverage changes the margin math.
- Account of 1000 USD or more: order volume is one step per 1000 USD of balance, so a smaller account keeps the minimum lot and carries a higher share of risk. The figures above were measured on 2500 USD.
- A VPS or an always-on machine: the expert manages open baskets tick by tick.
Good To Know
- The basket carries no stop loss on individual positions: it is closed as a whole, by target, by the balance limit or by the margin limit described above.
- Equity drawdown in the tested windows reached 32 percent, and the screenshots show that line unedited. Position size decides how that translates to your account.
- Leverage 1:500 and an account of 2500 USD were used in all tests; smaller accounts or lower leverage change the order size and the margin math.
- The expert is running on a demo account; a backtest measures the past.
