Flag & Pennant Patterns
Continuation patterns that form during pauses in strong trends.
Pattern Structure
Components: Flagpole (strong impulsive move) → Flag/Pennant (consolidation) → Breakout (continuation).
- Bull Flag — Strong upward pole, downward-sloping rectangular channel, breaks upward
- Bear Flag — Strong downward pole, upward-sloping rectangular channel, breaks downward
- Pennant — Strong move (pole), symmetrical triangle consolidation, breaks in pole direction
| Criteria |
Flag |
Pennant |
| Shape |
Rectangular channel (2 parallel lines) |
Symmetrical triangle (2 converging lines) |
| Slope |
Against trend |
Neutral |
| Volume |
Decreasing |
Decreasing |
Workflow
1. Get Swing Point Data
Identify the flagpole and consolidation boundaries:
get_candles_around_date(symbol=<symbol>, exchange=<exchange>, interval=<interval>, date=<flag_date>)
2. Draw Flag/Pennant Boundaries (2 parallel calls)
For flags (2 parallel trend lines sloping against the pole):
# Upper flag boundary
draw_chart_analysis(action="create", drawing={
"type": "trend",
"points": [
{"time": <flag_high1_time>, "price": <flag_high1_price>},
{"time": <flag_high2_time>, "price": <flag_high2_price>}
],
"options": {"text": "Flag R"}
})
# Lower flag boundary (parallel to upper)
draw_chart_analysis(action="create", drawing={
"type": "trend",
"points": [
{"time": <flag_low1_time>, "price": <flag_low1_price>},
{"time": <flag_low2_time>, "price": <flag_low2_price>}
],
"options": {"text": "Flag S"}
})
For pennants: same approach but lines converge (like a small symmetrical triangle).
3. Confirm and Enter
Confirm declining volume during consolidation via get_indicators(indicator_code="mfi", symbol=<symbol>, exchange=<exchange>, interval=<interval>).
Standard: Enter on break of flag/pennant boundary with volume spike. Stop beyond opposite side.
Conservative: Wait for breakout + retest of boundary. Enter on bounce.
Target: Flagpole length projected from breakout point.
Evidence and Validation
- Treat the setup as a testable hypothesis, not a prediction. Define thresholds, entry, invalidation, and exit before evaluating outcomes.
- Calibrate on the same instrument, venue, session, and timeframe. Use closed candles and a held-out or walk-forward sample; record every variant tried.
- Include spread, fees, slippage, borrow or funding, partial fills, and latency. Reject the setup when net expectancy is not positive or depends on one narrow parameter.
- Return observed inputs, missing data, cost assumptions, entry, invalidation, exit, and a valid, watch, or no-trade status.
- Research basis: Lo, Mamaysky & Wang supports objective pattern definitions and conditional testing rather than visual labels alone.
Key Rules
- Quantify the pole with return divided by ATR and a maximum bar count; “looks impulsive” is not reproducible
- Define and calibrate the maximum retracement rather than assuming 50% is universal
- Treat volume contraction and breakout expansion as candidate filters; report their measured values
- Quick formations are more reliable than extended consolidations
- Flag duration should be short relative to the pole
Related Skills
- triangle-patterns — Pennants are small symmetrical triangles
- channel-trading — Flags are short-duration trending channels
1---2name: flag-pennant3description: Define and test flag or pennant continuation shapes. Use when measuring an impulse, consolidation, closed-bar break, invalidation, and measured-move hypothesis.4license: Apache-2.05---67# Flag & Pennant Patterns89Continuation patterns that form during pauses in strong trends.1011## Pattern Structure1213**Components:** Flagpole (strong impulsive move) → Flag/Pennant (consolidation) → Breakout (continuation).1415- **Bull Flag** — Strong upward pole, downward-sloping rectangular channel, breaks upward16- **Bear Flag** — Strong downward pole, upward-sloping rectangular channel, breaks downward17- **Pennant** — Strong move (pole), symmetrical triangle consolidation, breaks in pole direction1819| Criteria | Flag | Pennant |20|----------|------|---------|21| Shape | Rectangular channel (2 parallel lines) | Symmetrical triangle (2 converging lines) |22| Slope | Against trend | Neutral |23| Volume | Decreasing | Decreasing |2425## Workflow2627### 1. Get Swing Point Data2829Identify the flagpole and consolidation boundaries:3031```32get_candles_around_date(symbol=<symbol>, exchange=<exchange>, interval=<interval>, date=<flag_date>)33```3435### 2. Draw Flag/Pennant Boundaries (2 parallel calls)3637**For flags** (2 parallel trend lines sloping against the pole):3839```40# Upper flag boundary41draw_chart_analysis(action="create", drawing={42 "type": "trend",43 "points": [44 {"time": <flag_high1_time>, "price": <flag_high1_price>},45 {"time": <flag_high2_time>, "price": <flag_high2_price>}46 ],47 "options": {"text": "Flag R"}48})4950# Lower flag boundary (parallel to upper)51draw_chart_analysis(action="create", drawing={52 "type": "trend",53 "points": [54 {"time": <flag_low1_time>, "price": <flag_low1_price>},55 {"time": <flag_low2_time>, "price": <flag_low2_price>}56 ],57 "options": {"text": "Flag S"}58})59```6061**For pennants:** same approach but lines converge (like a small symmetrical triangle).6263### 3. Confirm and Enter6465Confirm declining volume during consolidation via `get_indicators(indicator_code="mfi", symbol=<symbol>, exchange=<exchange>, interval=<interval>)`.6667**Standard:** Enter on break of flag/pennant boundary with volume spike. Stop beyond opposite side.68**Conservative:** Wait for breakout + retest of boundary. Enter on bounce.69**Target:** Flagpole length projected from breakout point.7071## Evidence and Validation7273- Treat the setup as a testable hypothesis, not a prediction. Define thresholds, entry, invalidation, and exit before evaluating outcomes.74- Calibrate on the same instrument, venue, session, and timeframe. Use closed candles and a held-out or walk-forward sample; record every variant tried.75- Include spread, fees, slippage, borrow or funding, partial fills, and latency. Reject the setup when net expectancy is not positive or depends on one narrow parameter.76- Return observed inputs, missing data, cost assumptions, entry, invalidation, exit, and a valid, watch, or no-trade status.77- Research basis: [Lo, Mamaysky & Wang](https://www.nber.org/papers/w7613) supports objective pattern definitions and conditional testing rather than visual labels alone.7879## Key Rules80- Quantify the pole with return divided by ATR and a maximum bar count; “looks impulsive” is not reproducible81- Define and calibrate the maximum retracement rather than assuming 50% is universal82- Treat volume contraction and breakout expansion as candidate filters; report their measured values83- Quick formations are more reliable than extended consolidations84- Flag duration should be short relative to the pole8586## Related Skills87- **triangle-patterns** — Pennants are small symmetrical triangles88- **channel-trading** — Flags are short-duration trending channels