I think that "at the end of the day" part is missing. Now I guess you have too much trades, because it's very easy for them to be closed. So I can suggest to use "Once a day" or some time filter like "Time filter" or "Hours filter"... something that will cause the "Close trades" block to run when it's needed only, not all the time when RSI is between 20.5 and 79.5 🙂