hello i have a question
I have programmed an EA that will execute positions every minute
and then when a certain amount is reached the EA triggers a close all position
My problem is that it might be hundreds of positions and closing all these one after another by the EA takes time and causes slippage which turns out in a loss.
So I need to solve it differently
here are ways I would like to realize and dont knwo how yet with the generator I kindly ask for your help on the instructions:
example:
1)
i have 56 x 1 lot buy positons open on the market and I want that once total profit amount of for example 5000€ is reached
the EA should open only 1x 56 lot sell position and then perform a close-by to cancle the trades out
2)
I have an EA that gives signals every minute either buy and sell and I want the EA that the MT4 shall not keep all the positions open but to cancel the Positions out by First In First out
so say 1st position is a buy position then 2nd position is a buy position and then 3rd position is a sell position the third position should cancel out with the 1st position
3) (same as 2) but Last in First out)
I have an EA that gives signals every minute either buy and sell and I want the EA that the MT4 shall not keep all the positions open but to cancel the Positions out by Last In First out
so say 1st position is a buy position then 2nd position is a buy position and then 3rd position is a sell position the third position should cancel out with the 2nd position (the last position of the other side)
can anyone help to code?
thank you for your support!
alex