A sharp rise, a short and shallow pause, then a close through the pause's upper trend line.
The pattern
A flag is a pause in a trend: a sharp rise — the pole — then a short, shallow drift sideways or down — the flag — before the rise resumes. The rule finds the pole and the pause from local highs and lows, draws the pause's upper trend line, and buys a close above it. It then holds for about as many bars as the pause lasted.
Why it might work
After a strong move, some buyers take profits and the price rests. If the pause is shallow, it says the sellers were few: once they are done, the trend can go on. A bear flag is the same pattern turned upside down, traded on the short side.
Testing a chart pattern honestly
Chart patterns are easy to see after the fact and hard to define in advance. Coding the pattern exactly — what counts as a pole, how shallow a flag must be — and testing every size of flag, not the one that looks best, is what separates a pattern from a story. Many classic patterns (head and shoulders, harmonics) show no regular edge once defined this strictly; flags are one of the few that neurotrader888 reports holding on bitcoin's hourly bars, in both directions.