Smart Martingale Duplicator EA
ON A SAME TERMINAL, it's not a souce copy and client, only a duplicator.
I want to create a smart martingale duplicator EA based on asset
All Asset = True
Asset = EURUSD (if All asset is false)
Lot multiplier = 1.5
Maximum Number Serie = 5
Max lot = 100
Link to the Source = true
I open an order :
BUY EURUSD 0.04 at 1.1689 SL = 1.1500 TP = 1.1700
---
Case N°1
after 1 hour, the order is close at 1.1700 with profit
nothing happen
---
Case N°2
after 1 hour, the order is SL at 1.1500 with loss
Ok record a NEW SERIE 1 Loss
Wait for a new order ....
New Order Is open by an external EA
SELL EURUSD 0.02 at 1.15450 SL = 1.1600 TP= 1.14000
++ Duplicate ++
Open a Order SELL EURUSD 0.03 (0.02*1.5) at 1.15450 SL = 1.1600 TP= 1.14000
You have so :
EURUSD 0.02 at 1.15450 SL = 1.1600 TP= 1.14000 (source)
EURUSD 0.03 at 1.15450 SL = 1.1600 TP= 1.14000 (duplicate)
SERIE 1 on 5
Case N°1
if the source position is close on profit then nothing happen
SERIE is reset
Case N°2
if the original position is close on a loss then
SERIE 2 on 5
wait for another order
then
..........
until SERIE 5 on 5 / after 5 loss Series Reset Serie 1 on 5
----------
It's very important that the source and the duplicate Order are linked / If original is closed (by a trailing stop Supertrend for eaxample) the duplicate have to be closed too.
Example :
A-EURUSD 0.02 at 1.15450 SL = 1.1600 TP= 1.14000 (original)
B-EURUSD 0.03 at 1.15450 SL = 1.1600 TP= 1.14000 (duplicate)
if A is closed buy a trailing stop or manual or other so B is closed at the same time.
---
OK
Lot multiplier = 1.5 (for example)
Maximum Serie = 5 (for example)
I open an order :
Buy GBPUSD 0.21 lot
--
after 1 hour the order is closed in profit +100 $ for example, it's good nothing happen
--
But if
after 1 hour the order is closed in loss -75 $ for example
then I want the next GBPUSD order will be opened x 1.5 lot
So after 2 hours (for example) I open a new GBPUSD order with
SELL GBPUSD 0.14 lots
++ Duplicate Order ++ open a new SELL GBPUSD 0.21 Lots
So now you have 2 open orders:
SELL GBPUSD 0.14 lots (source)
SELL GBPUSD 0.21 lots (duplicate new)
---
The duplicate is linked to the source, if I close manually the source, the duplicate is closed too.
--
Then if after 30 minutes (for example) the Source order is :
closed in Profit = Nothing happen
Close in loss again for example 150 $
then wait for a new GBPUSD open order and duplicate it again x 1.5 until the maximum series allowed (example 5).
--
It's just duplicate the order with increase amount if conditions are respected
Thanks.