5-Minute Bar Sets Hourly High or Low

Q:  How do you design an alert when a 5 minute bar is either the high for the last hour or the low for the last hour?

A:  Here is an example where the high and low of the last twelve 5-minute bars is found and then tested to see if the current bar is setting that value.   12 bars were used on the 5-minute chart because that amounts to the last hour.