An illustrative specification for a bull flag chart pattern
There is no single threshold set implied by the name bull flag. This example uses a deliberately simple fixed-window definition, ordinary price candles and positive prices. Choose a start bar before examining its outcome. Let S be its close, E the close six bars later, and H = E - S. The next six completed bars form the proposed flag. These choices are hypothetical research rules, not recommended settings or the TradingView built-in algorithm.
- Before confirmation, reject at a completed bar if its low is below E - 0.40H or its close is below L(t). Check rejection before breakout on the same bar. If neither occurs by the close of flag bar 10, expire the candidate.
- The first-to-last-high line is a strict custom construction. A visually plausible flag can fail it. Do not move an anchor after seeing a breakout just to admit that example.
- For an automated scan, also specify how start bars are selected and whether overlapping windows are allowed. This worked example classifies one preselected window; it does not define a market-wide scanner.
| Feature | Rule for this example | Meaning |
|---|---|---|
| Upward pole | H / S is at least 8%; at least five of the six close-to-close changes are positive | A concentrated advance rather than a small drift |
| Channel slope | Join the highs of flag bars 1 and 6; slope m = (high6 - high1) / 5. Require -0.03 ≤ m / H ≤ 0 | Flat to downward slope, normalized by the pole height |
| Parallel boundaries | U(t) = high1 + m × (t - 1). Reject if any of the six highs exceeds U(t). Set W to the largest U(t) - low(t), and L(t) = U(t) - W | A fixed upper line and parallel lower line enclosing the six bars |
| Width and retracement | Require 0 < W / H ≤ 20% and 0 ≤ (E - lowest flag low) / H ≤ 40% | The pause stays narrow and gives back a limited part of the advance |
| Confirmation window | Evaluate only flag bars 7 through 10; require close > U(t) | The channel is known before the first eligible signal |