First and most important detail is that all custom scans on Thinkorswim use Eastern timezone. I notice from your chart and your selected times you are using Pacific timezone. So the first thing we need to do is adjust those times to match Eastern timezone. Which give us the target times of 9:59 and 10:00.
The next detail I want to explain is that my approach is completely different. Rather than try to create an offset value to the target bar and accessing the value from that bar using the GetValue() function, I simply use the input times to directly read the volume data from each target bar. Then I use recursion to carry those values forward, which can then be used as in a comparison to check if your condition is true.
The screenshot below shows what this looks like on a chart. The red line is generated based on the first time input. The white line is generate based on the second time input. Notice in this example you provided, the first volume bar is higher than the second. So this particular ticker symbol does NOT satisfy your condition.
To be clear, your example code includes a multiplier in your condition. Such that the second volume bar (white line) must be 5 times higher than the first (red line).
Here is the code to display as shown in the chart:
input targetTimeOne = 959;
input targetTimeTwo = 1000;
rec volumeAtTimeOne = if SecondsTillTime(targetTimeOne) == 0 then volume else volumeAtTimeOne[1];
rec volumeAtTimeTwo = if SecondsTillTime(targetTimeTwo) == 0 then volume else volumeAtTimeTwo[1];
plot test1 = volumeAtTimeOne;
plot test2 = volumeAtTimeTwo;
And here is the code required to run your scan:
input targetTimeOne = 959;
input targetTimeTwo = 1000;
input volumeMultiplier = 5.0;
rec volumeAtTimeOne = if SecondsTillTime(targetTimeOne) == 0 then volume else volumeAtTimeOne[1];
rec volumeAtTimeTwo = if SecondsTillTime(targetTimeTwo) == 0 then volume else volumeAtTimeTwo[1];
plot scan = volumeAtTimeTwo > volumeAtTimeOne * volumeMultiplier;