So are you only wanting to close a trade if the opposite signal true? so only close buy trades if a sell trade comes up and Vis versa for sell?

It would be like this
8df36e2a-9497-4324-afa8-b34148f5e17d-image.png