t5Copier
This is a trade copier EA that operates in two modes: Server mode broadcasts trade transactions to a shared file, and Client mode reads those transactions and replicates them locally with configurable lot sizing via a copy factor. Communication between Server and Client instances uses file-based IPC through MetaTrader's common data folder.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
Not backtested yet — this EA could not be converted automatically.
Strategy analysis
This EA is a trade copying utility rather than an autonomous trading strategy. The Server mode captures all trade events (opens and closes) from the master account via the OnTradeTransaction callback, serializing trade data (direction, lot size, SL, TP, symbol, leverage, equity, etc.) into a binary structure written to a shared file. The Client mode reads this file on each tick and timer event, replicating trades with lot sizes adjusted by a configurable copy factor, using the formula: (local equity × source lots / source equity) × (copy_factor/100). Exit logic maintains a mapping table of server tickets to client tickets, closing the corresponding local position when the server sends a close signal. Position sizing is handled by the VerifyLots function which normalizes lot sizes to the instrument's minimum step and valid range. In terms of money management, the copied lot size is proportionally scaled based on the ratio between source and local account equity, implementing equity-ratio-based adaptive position sizing.
Strengths
- Equity-ratio-based position scaling is well-designed, automatically adapting to accounts of different sizes
- Retry mechanism queues failed trades due to requotes instead of silently discarding them
- File-based IPC requires no network configuration, making same-terminal instance communication simple and reliable
- VerifyLots function properly normalizes lot sizes, accounting for volume step, minimum and maximum lot constraints
- Server abnormal shutdown notifies clients via a delete file marker, providing basic disconnection detection
Weaknesses
- No concurrency control for file-based communication; multiple clients reading simultaneously may cause data races and duplicate trades
- The pair_ticket mapping is stored in a static array and is lost on EA restart, making it impossible to close positions copied before restart
- No heartbeat mechanism; if the server crashes silently, the client may remain unaware for extended periods
- The Data structure allocates only 8 bytes for symbol name, insufficient for longer instrument names
- The client does not verify data integrity after reading; the hash field is declared but never used, risking processing of incomplete data
Possible improvements
- Add heartbeat mechanism and timeout detection: server periodically writes timestamps, client auto-disconnects and alerts on timeout
- Replace file sharing with pipes or socket communication to support cross-terminal and cross-machine remote copying scenarios
- Utilize the hash field for data integrity verification to prevent the client from reading partially-written data
Risk assessment
Overall risk: Medium
- Ticket mapping is lost on EA restart, potentially leaving copied positions uncloseable
- File read/write lacks atomicity guarantees; client may read incomplete trade data
- copy_factor accepts arbitrary values; excessively large factors may create positions beyond account capacity
- Lack of concurrency control in multi-client scenarios may cause duplicate position openings
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
program_mode | Server | Program mode: Server=sender, Client=receiver |
server_id | LetCashFlow | Server identifier, must be unique per instance |
copy_factor | 100 | Copy factor, 100%=original ratio, scalable up/down |
max_slippage | 20 | Maximum allowedslippage(points) |
no_try | true | Abandon trade on excessive slippage; false=retry queue |
Similar Utility EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.