XAUrally: three gold engines on one chart - how it works and how to test it
I have just published my first Expert Advisor on the Market: XAUrally, a fully automated EA for XAUUSD on M1 charts of hedging accounts. This post explains what the EA does, what it does not do, and how to test it yourself before deciding anything.
What XAUrally is
XAUrally runs three independent trading engines on a single XAUUSD M1 chart. Each engine has its own entry logic, its own exit rules and its own magic number:
- BASKET (long only) buys gold in four defined situations and builds a basket of equal-lot layers at fixed price steps — never martingale, at most 10 layers, one basket at a time. The basket is closed at a bar open when its profit per ounce reaches the target of the sub-strategy that opened it. A basket brake (loss limit in USD per 0.01 lot) and a maximum basket age limit every basket.
- BREAKOUT places buy stop / sell stop orders at H1 swing levels and on the Asian session range, and manages open trades with a tight trailing stop. A regime switch keeps a shadow record of every module and sends real orders only while the recent shadow results are positive.
- LEVEL places stop orders at a ladder of recent daily highs and lows, one position at a time, with a 30-day equity-curve filter.
Account protection is built in: a trade-idea guard (floating loss of one direction in percent of balance), a daily guard (equity loss from the start of the trading day in percent), and the basket brake. Every order request is checked against the broker's trading conditions before it is sent.
What you will not find in the inputs
The inputs contain account settings only: which engines to run, the lot scheme and the lot per engine, the broker server time, the protection levels and the magic number. The strategy parameters are built into the EA and are the same in every copy, so the EA behaves exactly as tested. There is nothing to optimize, and that is intentional: an optimized parameter set that differs from the tested one is a different system.
What it is not
- It is not a "set and forget" guarantee. The BASKET engine is a grid: it adds positions while the price moves against the basket, and a basket can be closed at a loss by the basket brake or by the guards.
- The guards cannot act while the market is closed. A weekend gap can produce a larger loss than the set limits.
- Backtests over several years show that results depend strongly on the starting month; some 12-month periods ended with a loss, and calm, low-volatility markets produced losing months. Backtests do not guarantee future results.
- It is not designed for prop-firm challenges: their daily loss limits are usually much tighter than the default guards.
How to test it yourself (free)
1. Download the demo from the product page and open the Strategy Tester.
2. Symbol XAUUSD, timeframe M1, modelling "Every tick based on real ticks", deposit 1,000 USD, leverage 1:100, default inputs. Test at least 6–12 months: the BREAKOUT swing modules start in shadow mode and send real orders only after enough shadow trades have been recorded.
3. Run a second test over a period you consider difficult (for example a calm year). Look at the equity drawdown, not only at the net profit.
4. If your broker's server time is not EET, choose "Fixed GMT offset" in the inputs for the backtest; keep AUTO for live trading.
5. Before going live, run a backtest that ends on the current date: at the end of the test the EA saves its switch history in the common files folder, and the live EA loads it automatically.
Recommended setup
Hedging account, XAUUSD M1, one chart per account, default lots 0.01 with at least 1,000 USD (2,000 USD or more for the same lots is lower risk), a low-spread broker and a VPS running 24/5. Keep the Algo Trading button enabled before attaching the EA so that pending orders with expiration are accepted from the first moment.
Support
Questions go in the Comments tab of the product page; I answer there, and recurring questions are added to the FAQ in the description. The one-month rental lets you run the full EA on your own account before deciding on the unlimited licence.
Product page: XAUrally on the Market


