agentleFS
SKE-LabsSKE-Labs/agent-trading-skills/skills/chart-patterns/flag-pennant/SKILL.md

flag-pennant

Skill17 starsChanged 4 months agoApache-2.0View on GitHub

Define and test flag or pennant continuation shapes. Use when measuring an impulse, consolidation, closed-bar break, invalidation, and measured-move hypothesis.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Conservative: Wait for breakout + retest of boundary.

    line 71
  2. Distinctive:

    Treat the setup as a testable hypothesis, not a prediction.

    line 76
  3. Distinctive:

    Treat volume contraction and breakout expansion as candidate filters.

    line 85

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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
CriteriaFlagPennant
ShapeRectangular channel (2 parallel lines)Symmetrical triangle (2 converging lines)
SlopeAgainst trendNeutral
VolumeDecreasingDecreasing

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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.