EA that closes all positions if +X/-X% is hit
-
Anyone got an EA where it can close all running positions if X amount has been achieved or if X amount has been lost?
Base values im after is 10% Profit = Close all trades and book the 10%
And -5% = close all trades and take the -5% loss.I dont want it limited to a day, but more of a running EA that just waits till X amount has been hit then closed out.
I short term invest and diversify all my positons across the market, This also helps with drawdown amounts due to a basket of different trades moving at once.
However if my profit hits 10% id like to close all positions to book the 10% and the same if i lose 5%.I should note that this is for the base starting balance, Not running equity.
-
@telfordstarb You need something like, when a trade is placed use balance/100*required % put into a variable, in a condition block when profit = variable close all trades.
-
How would i start that exactly? Im ok(ish) at the condition blocks but not the variables
-
@telfordstarb Something like this, just add this to your project:
-
hi, i need so help, how to make ea that closes all trades once the previous loss is recovered by the current running profits. eg . if i just lost four dollars in the recent cosed trade, but i have a current trade now runing in four dollars or beyond, i want the ea to close that trade and i wait for other trading opportunites