Ouch, definitely not the first puzzle I wanted to try to unravel first thing in the morning. Not sure if this does the trick but this is what I came up with for the final scan statement in your code:
plot scan = AbsValue(fib2 - fib1) / fib1 > percentDiff * 0.01;
For the ticker symbol I tested (AAPL) I had to reduce the user input for "percent diff" down to a value of 1 from it's default value of 10. This code ignores the first bar of the day (the plots you were trying to use report Double.NaN on the first bar of each day). So I had to use the fib1 and fib2 variables for the scan signal instead of the ones you tried to use (fib and pfib2). In this way the scan will work on the first bar of the day.
The aggregation period is never used in your code so you can just take that out completely. And the signal is the same for every bar on the chart (except for the opening bar). So you can run this on a 30 time frame and get the same exact results as on the 5 min time frame. It does not work on the 1 hour time frame but I didn't take the time to understand why.
I spent way to much time trying to unravel this.