Help me building this EA
-
Hi can someone helps me creating this EA. I tried but I failed
.I want it to open 2 orders buy and sell at same time with 10 pips TP and so SL with a customized lot size let's say "1 lot '' and call it the base lot size(I managed to do that ).
when one of those orders Hit TP,open another position in the same direction of the closed one with 10 pips TP no SL but the lot size is % of the running position. ex : open 1 lot buy+1 lot sell , 1 lot sell hit tp then open another sell 50% lot size of the running position "the already running 1 lot buy" so the lot size would be 0.5".the 50% value must be customized.
then every time an order hit TP ,partially close X% of the running position and open another position in the same direction of the closed one with 10pips TP no SL but the lot size is % of the running position (the remaining lot size after partial close).
close all when the final lot size of orders are equal or less than % of the base one . ex : close all trades when lot size reach 2% of the base one '0.02 lot of 1 lot base lot size).
That would be great if someone make such thing or even a part of it.
thanks :

-
Here is some example: https://fxdreema.com/shared/p4ttu6tud
Here I used Martingale, which normally doubles the lot size on loss, but I customized it to half the lot size on profit. Then I separated trades in two groups - 1 and 2, because Martingale normally don't care what type was the last trade - buy or sell - but cares about the group.There are probably other ways to do this, but I choosed this one, I think this uses less blocks as possible