close multiple biggest loss trades with multiple profitable trades with partial close after#

Avatar
  • updated
  • Planned (collecting votes)

Hello,

the EA only close the biggest loss trade and all profitable trades if the partial close after# is set to big number of trades.

the idea is to close multiple biggest loss trades with multiple profitable trades.

here the scenario:

if there are opened trade series in order {-100, -80, -60, -40, 20, 30, 50, 15, 70}
i want to close the biggest loss trade -100 with 20 if all their values are greater or equal than min profit to close=10$, but since (-100+20 <10), then add the next profitable trade 30 to the previous calculation since (-100+20+30<10). then add the next profitable trade 50, since (-100+20+30+50<10). then add the next profitable trade 15 since (-100+20+30+50+15>10) close the biggest loss trade and the profitable trades that were added in the calculation. then apply the same process to the next biggest loss trade -80 and so on.


in this scenario, the ea should first look for the biggest loss trade and then find multiple profitable trades in the series that can have their values combined to greater or equal than min profit to close.  then closing them. after that the EA find the next biggest loss trade and make the same process. this makes sure that the EA close multiple loss trades and multiples profitable trades and reduce the risk especially for anti-martingale series.

Avatar
2
Andrey Khatimlianskyi
  • Planned (collecting votes)

Makes sense for partial close after# values.

Let's do it.