agentleFS
SKE-LabsSKE-Labs/agent-trading-skills/skills/chart-patterns/head-and-shoulders/SKILL.md

head-and-shoulders

Skill17 starsChanged 4 months agoApache-2.0View on GitHub

Define and test head-and-shoulders or inverse patterns. Use when measuring objective pivots, neckline breaks/retests, symmetry, invalidation, and measured-move outcomes.

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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:

    Preferred: Wait for neckline break, then retest.

    line 82
  2. Distinctive:

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

    line 87
  3. Distinctive:

    NEVER trade before neckline break — pattern incomplete until confirmed

    line 94
  4. Distinctive:

    Must have a prior trend to reverse.

    line 96

≈ “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

Head and Shoulders Pattern

A conventional reversal shape following a prior trend. The neckline break and target remain hypotheses whose conditional outcomes must be measured.

Pattern Structure

H&S (Bearish Reversal)

  1. Left Shoulder — Rally to new high, pullback
  2. Head — Higher high than left shoulder, pullback
  3. Right Shoulder — Lower high than head, starts to drop
  4. Neckline — Connect the two pullback lows

Inverse H&S (Bullish Reversal)

  1. Left Shoulder — Drop to new low, bounce
  2. Head — Lower low, bounce
  3. Right Shoulder — Higher low, starts to rise
  4. Neckline — Connect the two bounce highs
CriteriaRequirement
ActivityCompare right-shoulder volume with the left using a predeclared statistic
SymmetryShoulders roughly equal height
Prior trendMust have existing trend to reverse

Workflow

1. Get Exact Data

get_candles_around_date(symbol=<symbol>, exchange=<exchange>, interval=<interval>, date=<head_date>)

2. Mark Structure Points (3 parallel highlight calls)

draw_chart_analysis(action="create", drawing={
    "type": "highlight",
    "points": [{"time": <ls_time>, "price": <ls_price>}],
    "options": {"text": "LS"}
})

draw_chart_analysis(action="create", drawing={
    "type": "highlight",
    "points": [{"time": <head_time>, "price": <head_price>}],
    "options": {"text": "Head"}
})

draw_chart_analysis(action="create", drawing={
    "type": "highlight",
    "points": [{"time": <rs_time>, "price": <rs_price>}],
    "options": {"text": "RS"}
})

3. Draw Neckline

draw_chart_analysis(action="create", drawing={
    "type": "support",
    "points": [
        {"time": <neckline_left_time>, "price": <neckline_left_price>},
        {"time": <neckline_right_time>, "price": <neckline_right_price>}
    ],
    "options": {"text": "Neckline"}
})

For inverse H&S, use "resistance" instead of "support".

4. Enter

Standard: Enter on neckline break + close with volume. Stop above right shoulder. Preferred: Wait for neckline break, then retest. Enter on rejection. Tighter stop. Target: Head-to-neckline distance projected from break 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 studied algorithmic head-and-shoulders recognition and found conditional information in some samples, not a guaranteed reversal.

Key Rules

  • NEVER trade before neckline break — pattern incomplete until confirmed
  • Volume differences are contextual and do not validate the pattern without a neckline break
  • Must have a prior trend to reverse; H&S in a range is invalid
  • Record shoulder-height asymmetry rather than assuming a lower right shoulder always increases expectancy

Related Skills

  • double-top-bottom — Similar reversal family
  • multi-timeframe-analysis — HTF H&S signals major reversals

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.