Hello!
You do not need to actually "remember" anything.
Just make two triggers, named "Trigger 1" and "Trigger 2". Trigger 1 sets a variable with any name to any value, say "fav" to 1. The important thing is that the trigger must apply to the "Favourite" and in the conditions put:
Market's Minutes before the off is less than 5
In the second trigger, back on "First Matching Selection", and in the condition check:
Trigger Trigger 1 Number of runs per selections is greater than 0
and
Market's Minutes before the off is less than 0.25