That seems possible. Loop through your Closed positions and check for each loss-trade how long ago it was closed (use block check age). With this you should be able to achieve what you describe.
Move the once per bar under the conditions (so you have 2, 1 for each branch), if above the conditions are checked after the once per bar activates, it needs to activate after the condition is checked.