Closing trade when one of my confirmation indicators gives opposite entry signal
-
Hi, I've been trying to figure out how to close a trade when one of my confirmation indicators is giving me an opposite entry signal. I tried it with "Close trades" function but it immediately closes all trade. I can't put it after my "Buy" function because it requires more confirmations.
Example:

This is closing instantly.Without the "Close trade" function:

It should close on the candle that is pointed by the arrow.Project: https://fxdreema.com/shared/2EsCzU6P (It's a mess)
Thanks
-
This shared project is without the "Close trades" function, I just have no idea where to put the function.
Buy trades should close if block 395 or block 611 is true for the buys.
Sell trades should close if block 339 or block 302 is true for the sells.
-
This is what I have now, but it doesn't meet my satisfaction.
https://fxdreema.com/shared/QQ7bEuzue -
Also in the second screenshot you see that there was a trade opened an closed right after. The second trade closed on break-even but should close on the pointed arrow candle.
I've no idea why the first trade closed right after and why the second trade didn't close on the pointed candle. -
@kriespy The reason trades close instantly is because your condition has left operand == right operand, but there is no difference.
