A grid expert advisor for Gold (XAUUSD) that starts each basket on an RSI signal: when RSI comes back above the oversold level it opens a buy, when it comes back below the overbought level it opens a sell, always on a closed candle. A Reverse switch flips both signals if you trade the other way.
While a basket is open and price moves against it, the EA adds a new level every set distance in points, with a lot multiplier and a maximum number of levels. The first lot can be fixed or sized from a percent of balance or equity. The whole basket closes together at a target in money or in points from the average price, with an optional basket stop loss and an optional trading hours filter.
Be clear about what this is: a grid with a lot multiplier and no stop loss on each position. Margin use grows with every level, and a long move against the basket can take a large part of the account when the basket stop is off. Run it in the Strategy Tester first and size the lot, the step and the number of levels to your own account. No result is promised.
Strategy
Lot settings
Close / Exit
Risk protection
Filters
Expert settings
The whole entry lives in one function, XP_Signal(), which returns 1 for buy, -1 for sell and 0 for nothing. Replace it with any other indicator and you keep the same grid, lot sizing and basket exits with MACD, Bollinger Bands or Stochastic. Run your own backtest on XAUUSD, EURUSD, GBPUSD and BTCUSD, compare the steps and multipliers, and keep the basket stop on until you know how deep your settings can go. For partial exits on single trades, pair it with my Partial Close Multi TP Manager.
Open source. Use it as it is, adapt it, build your own version on top of it.
New versions and new tools are announced first on my MQL5 channel: /en/channels/xander
Questions, suggestions and your own backtests are welcome in the Xander Lab group: /en/messages/02eec85e4364dd01
More tools on my profile: /en/users/09151993a
Provided as is, use at your own risk.
Trade Manager Utility
Manages positions that are already open: it adds a missing SL/TP, moves the stop to break even, trails it, caps the position count and applies daily equity limits. It never opens trades.
Session Range Breakout
Draws the high and low of a chosen time window and alerts on the first break on each side. The levels are also available through iCustom.
Trade Journal Exporter - closed trades to CSV, one row per position, with MFE/MAE, R multiple and session
Exports your closed trade history to a CSV file with one row per position (not per deal), ready for Excel, Python or any journal. Each row has ticket, symbol, magic number, comment, side, volume, entry and exit time and price, duration, initial SL and TP when known, gross profit, commission, swap, net result and R multiple. It also calculates MFE and MAE (best and worst price reached while the trade was open, in points and in money) from the M1 bars between entry and exit, plus the entry session (Asia, London, New York) and weekday. Filter by magic number (lists and ranges) and symbol (wildcards), pick the period, the column separator (; or ,) and the decimal mark, and save to MQL5\Files or the common folder. Tested on hedging accounts and in the Strategy Tester (netting logic included; feedback welcome), where the file is written when the test ends. Read-only: it never opens, modifies or closes a trade. No DLLs, no web requests.
Daily Loss Guard - daily loss and total drawdown limits for funded / prop-firm accounts
Utility Expert Advisor that watches the account equity against two limits: a maximum daily loss and a maximum total drawdown. Each limit can be set as a percentage or as a money amount, and the daily loss can be measured from the balance or from the equity at the start of the day, as many prop firms do. When a limit is touched the EA closes all positions, deletes all pending orders and keeps the account locked until the next trading day: anything opened in the meantime, by another EA or by hand, is closed again. Optional early warning at a percentage of the limit (Alert and push), a small on-chart panel, a magic number / symbol filter, a configurable day-reset time and retries when a close fails. The state is stored in terminal global variables, so a restart does not unlock the account. Works on hedging and netting accounts. No DLLs, no web requests. It never opens trades (only the optional Strategy Tester demo mode does).