@fibolatschi I think, when you start using groups, you need to put it everywhere trades are related. Use greoup 1 or 2 for the 2 kinds and if condition (eg "If trade", "Check trades", "Close Trade", etc) apply for both groups, use 1,2
I agree with Hadees. Try to find any already existing soltution, work it out on a beta project and then share it here for us to take a look on it. We'll help you.
@fibolatschi If your exit condition is met on entry it shouldn't be a valid entry condition. However, I guess you work on candle ID 0 (current candle) and that may cause the issue. Am I right?
It would be easier id you'd share the project.