Trade copy EA
- EA copies trades from sender to receiver.
- Open, modification and close of trades are copied.
Opening of the trade:
- Trades get copied with the same relative lot size, i.e. risk is 1:1. For e.g if the sender opens a trade with 1 lot size with a balance of $10,000 -- > receiver with the balance $1,000 will have trade opened with 0.1 lot size.
- Here, I want to be able to define an amount for the ratio. I mean, for the EA to calculate the relative lot size, I want to define an amount. For e.g. receiver has a balance of $1,000 but I want to be able to enter an amount that should be taken for the ratio. So say I enter $100, so trade opens with 0.01 lot size.
- After opening of trades, once all trades get closed.
- In case of profit, I want the EA to calculate the profit (current balance less initial balance), take 50% of the profit (I want to be able to enter this percentage), add this amount to the initial risk ($100) and use this new amount for the relative lot size ratio.
- Note : there will be more than one trade opened, so the EA should calculate profit when all the trades are closed.
keys: Initial balance = B0
Current balance = B1
Initial risk amount = R0
New risk amount = R1
- EA to use the new amount for the relative lot size calculation
- in case of profit again, I want the EA to calculate the profit (new current balance less B1), take 50% of the profit, add this profit to R1 and use this new amount for the relative lot size ratio.
- this continues until loss, and the EA then risks the amount initially defined for the risk.
- In case of loss at any point, the EA risks the amount defined and considers that for the relative lot size.
- Ea shows a box on receivers side that shows how much amount is being risked, previous risked amount, and profit on the recent trades closed.
- All trades close once the drawdown reaches amount risked.
Modification of trade:
- When sender modifies the trade, modifications get copied at the receiver's end.
- example of modifications: changes to take profit or stop loss
Closing of trade:
- When sender closes the trade, trade get closed at the receiver's end.
- There can be multiple trades, so only specific trades should get closed
- EA should not change the risked amount for the relative lot size until all the trades are closed. It is then to calculate if there is a profit or loss and change the risk amount accordingly.