agentleFS
SKE-LabsSKE-Labs/agent-trading-skills/skills/ict-smart-money/market-structure-shift/SKILL.md

market-structure-shift

Skill17 starsChanged 4 months agoApache-2.0View on GitHub

Detect Break of Structure (BOS) and Change of Character (CHoCH) for trend analysis. Use when identifying trend reversals, confirming entry signals, or determining market bias direction.

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    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:

    Detect structure breaks: only after a closed bar exceeds the pivot by a calibrated tick/ATR buffer.

    line 39
  2. Distinctive:

    Wait for the closed-bar BOS trigger

    line 43
  3. Distinctive:

    Stop below recent swing low (bull) or above swing high (bear)

    line 45
  4. Distinctive:

    Treat HTF CHoCH as a candidate reversal condition

    line 48
  5. Distinctive:

    Wait for LTF BOS in the new direction

    line 49
  6. Distinctive:

    Stop beyond the CHoCH swing point

    line 51
  7. Distinctive:

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

    line 55
  8. Distinctive:

    Never use an unconfirmed right-edge pivot or intrabar break.

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Market Structure Shift

Identify trend direction and potential reversals through swing point analysis.

Structure

Swing Points

  • Higher High (HH) + Higher Low (HL) = Uptrend
  • Lower Low (LL) + Lower High (LH) = Downtrend

Choose an objective swing algorithm before analysis—for example, a pivot with fixed left/right bars or an ATR-reversal rule. State how equal highs/lows, nested swings, and the unconfirmed final pivot are handled.

Break of Structure (BOS)

  • Descriptive continuation label under the chosen swing rule
  • Bullish BOS: Price breaks above swing high (HH)
  • Bearish BOS: Price breaks below swing low (LL)

Change of Character (CHoCH)

  • Descriptive possible-change label, not confirmation of reversal
  • Bullish CHoCH: In downtrend, price breaks above LH
  • Bearish CHoCH: In uptrend, price breaks below HL

Workflow

  1. Identify current trend on a predeclared context timeframe:
    get_candles_around_date(symbol=<symbol>, exchange=<exchange>, interval="4h", date=<date>)
  2. Mark swing points using draw_chart_analysis with highlight type (label HH, HL, LH, LL)
  3. Detect structure breaks only after a closed bar exceeds the pivot by a calibrated tick/ATR buffer.
  4. Map nested timeframes with exact ratios and timestamps. If context and execution structure conflict, return watch or no trade; do not force alignment.

Trend Continuation Entry (BOS)

  1. Wait for the closed-bar BOS trigger
  2. Enter on pullback to FVG or order block
  3. Stop below recent swing low (bull) or above swing high (bear)

Trend Reversal Entry (CHoCH)

  1. Treat HTF CHoCH as a candidate reversal condition
  2. Wait for LTF BOS in the new direction
  3. Enter on retracement to CHoCH level
  4. Stop beyond the CHoCH swing 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: Use BOS/CHoCH as explicit swing-labeling rules. Lo, Mamaysky & Wang shows why visual price patterns must be algorithmically defined and tested.

Key Rules

  • The context timeframe supplies a feature, not an immutable direction.
  • Never use an unconfirmed right-edge pivot or intrabar break.
  • Predeclare whether a single close, retest, or second-timeframe event is required; avoid future leakage.
  • Select timeframes for the instrument/session and test nested conflicts explicitly.

Related Skills

  • order-blocks — define and test candle zones around objective structure events
  • liquidity-zones — Structure breaks often occur after liquidity sweeps of swing points

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.