Has anyone worked on detecting historical gaps and fills in candlestick charts?  For example, on a daily chart, you might get a close at $100 and an open at $120 the next day.  As long as the price hasn't gone back to $100 since the gap, that gap isn't considered "filled".  I have a few ideas on how to handle this with rolling windows but wanted to throw it out to the community first.