The code has been removed. However, the huge code base still remains at your disposal allowing you to find a suitable code.
TradeGateway: Fake Broker for Trade Management Tests
A library for MetaTrader 5 that puts trade management code behind an interface and tests it against a fake broker, without a trade server. The fake checks stops level, freeze level, tick grid and volume step, answers with retcodes chosen by the test and logs every request. An example break-even rule and 26 test cases come with it.
Trailing Stop That Starts at the Take-Profit Level
Starts a trailing stop when the price reaches the take-profit zone of a position you already have open. The take profit is removed, extended or kept. It never opens trades.
Gold MACD Divergence Map
MACD regular and hidden divergences on closed bars with an honest first-touch statistics panel. Not a trading signal.
Close By Filter - close positions by side, symbol, magic number and profit
Closes only the open positions that match your filters and, if you choose, deletes matching pending orders. Shows a summary and asks before it acts.
Trade History Exporter - closed trades to CSV with R multiple, MAE and MFE
Saves your closed trades to a CSV file for your spreadsheet: one row per trade with points, costs, net result, R multiple, MAE and MFE.