allanmaug TRADECOPIER
This EA is a trade copier that operates in two modes: Master mode writes open position data to a binary file, and Slave mode reads that file to mirror positions on corresponding slave symbols. It supports symbol mapping between master and slave accounts and handles opening, modifying, and closing copied positions in real-time via a 50ms timer.
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 not a strategy-based trading program but rather a trade copying utility. Its core concept is transmitting master account position data (ticket number, symbol, volume, direction, open price, SL, TP) to slave accounts via a shared binary file. Entry conditions are triggered when the slave detects a new ticket number from the master, opening a same-direction market position on the corresponding slave symbol, with the master ticket stored in the comment field for tracking. Exit conditions occur when the master position no longer exists, causing the slave to match and close the corresponding copied position based on the comment field ticket number. Position sizing is entirely dependent on the master account's volume with no scaling or adjustment — it copies 1:1. Money management has no independent risk control mechanisms, with no checks on account balance, free margin, or maximum position count, relying purely on the master account's decisions.
Strengths
- Simple and clear architecture with separated master/slave modes that is easy to understand and maintain
- Supports symbol mapping, enabling trade copying between brokers with different symbol suffixes
- Implements complete copy lifecycle management: opening, SL/TP modification, and closing synchronization
- Uses binary file sharing for cross-terminal communication without requiring network configuration
- 50ms timer provides near-real-time copying response speed
Weaknesses
- No margin check — slave may attempt to open positions when balance is insufficient, leading to failures
- Only supports 2 symbol mappings with poor extensibility, cannot flexibly add more symbol pairs
- No file locking mechanism — concurrent master/slave access may cause data races or incomplete reads
- 1:1 fixed volume copying with no lot multiplier or proportional scaling functionality
- No error retry mechanism — trade failures are only logged via Print without any recovery handling
- Deleting copiedTickets elements after slave position close may cause index disorder in the array
Possible improvements
- Add dynamic symbol mapping configuration supporting arbitrary number of symbol pairs using struct arrays instead of hardcoding
- Implement file locking mechanism (e.g., using a separate lock file) to prevent concurrent read/write conflicts, and add trade error retry logic
- Add margin pre-checks, lot multiplier parameter, maximum position limit, and other risk controls to improve slave account safety
- Fix the index issue in copiedTickets deletion by iterating backwards or using a more reliable data structure
Risk assessment
Overall risk: Caution
- No file locking creates data race risk — slave may read incomplete or corrupted position data
- No margin pre-check means slave may fail to open positions due to insufficient funds without timely user awareness
- copiedTickets array deletion may cause index disorder, leading to subsequent position tracking failures
- 1:1 fixed copying with no risk control layer means any erroneous master decision is executed without filtering
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Mode | MODE_SLAVE | EA mode: master writes position data, slave reads and copies positions |
MasterSymbol1 | XAUUSD.ecn | Master account symbol 1 name |
SlaveSymbol1 | GOLD | Slave account corresponding symbol 1 name |
MasterSymbol2 | USDJPY.ecn | Master account symbol 2 name |
SlaveSymbol2 | USDJPY | Slave account corresponding symbol 2 name |
MagicNumber | 12345 | Slave mode magic number for identifying copied positions |
Similar Utility EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.