Fortunately, I closed the long position, and went short. Experience has shown that a failed breakout can yield a good trade as price goes against the trapped longs. In this case, price reversed again, and went well above my short entry. At that point, I had no business being in the trade, and covered the short.
As you can see above, the 5 minute bar at the open created a crazy candle. The lesson here is- this stuff happens, and the key is that as long as you know that you trade a system that has a positive expectancy, you have to take all signals, both long and short. There will be losing trades now and then, but we are trading on probabilities, not absolutes.