VPS Trade Copier
- Experts
- Savaliya Raj
- Versione: 1.3
- Attivazioni: 5
How It Works:
- Master Mode:
- Monitors open positions and their SL/TP changes on the Master account for a specified symbol (e.g., BTCUSD).
- Writes trade details (ticket, symbol, type, volume, price, SL/TP, status) to a master.txt file in the Common\Files directory every 100ms or when changes are detected.
- Optionally closes all trades at a specified StopTime (e.g., 13:15) if enabled.
- Supports fixed TP/SL, resetting dynamic SL/TP to zero and monitoring custom levels internally.
- Slave Mode:
- Reads trade data from master.txt every 100ms to detect new trades, closures, or SL/TP changes.
- Executes corresponding trades on the Slave account for a mapped symbol (e.g., BTCUSDm), applying a lot size multiplier (0.5 to 10).
- Supports trade direction mapping: same direction (Buy→Buy, Sell→Sell) or reversed (Buy→Sell, Sell→Buy).
- Synchronizes SL/TP with the Master or uses fixed TP/SL if enabled, validating levels against current market prices.
- Tracks and closes orphaned Slave trades (not in master.txt) and handles trade closures with retries.
- Key Features:
- Uses a TradeMapping structure to track Master-Slave ticket pairs and SL/TP values.
- Validates inputs like lot size multiplier and StopTime format.
- Implements retry logic (3 attempts) for trade execution and closure to handle errors.
- Supports one-way copying (Master to Slave) with feedback mechanisms disabled by default.
- Uses a timer (100ms) to avoid file access conflicts and ensure timely updates.

