Must it happen in the current bar? If so, yes, it's correct. The problem is that then price can cross back. BTW, don't connect 'Condition' and 'Close trades' blocks immediately after a Buy now unless you know very well it is necessary. Usually it never works.