agentleFS
SKE-LabsSKE-Labs/agent-trading-skills/skills/day-trading/gap-trading/SKILL.md

gap-trading

Skill17 starsChanged 4 months agoApache-2.0View on GitHub

Identify and test opening-gap continuation or fade setups. Use when price opens away from the prior session and the user needs a normalized gap definition, catalyst context, entry, invalidation, and cost-aware plan.

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:

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

    line 79
  2. Distinctive:

    Do not assume the open is noise or that a named gap type has a fixed fill probability.

    line 87
  3. Distinctive:

    Use a time-stamped session definition and adjusted prior prices.

    line 88
  4. Distinctive:

    Treat event-driven gaps separately and model opening-auction spread, slippage, and halt risk.

    line 89

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

Gap Trading

Trade price gaps by classifying gap type first -- different types require opposite strategies.

Identification

Distinguish a full gap (open above the prior high or below the prior low) from a body gap (open away from the prior close). State the exchange session, corporate-action adjustment, and overnight-trading treatment.

get_candles_around_date(symbol=<symbol>, exchange=<exchange>, interval="1D", date=<date>)

Compute both percentage gap and abs(Open - Previous Close) / prior ATR. Set the minimum from tick size, spread, and the instrument's historical gap distribution; do not use a universal percentage cutoff.

Gap Classification

Classify observable context rather than assigning universal fill rates:

ContextEvidence to recordCandidate hypothesis
Range / no catalystGap remains inside an established rangeFade after a defined reversal trigger
Level break / catalystGap clears a predeclared level with unusual participationContinuation after an opening range
Extended moveGap follows an objectively extended trendTest fade and continuation separately

Workflow

1. Detect and Classify

get_candles_around_date(symbol=<symbol>, exchange=<exchange>, interval="1D", date=<date>)
get_indicators(indicator_code="mfi", symbol=<symbol>, exchange=<exchange>, interval="1D")

Calculate both normalized gap measures. Compare volume with the same time-of-day baseline and document the catalyst from a primary source when available.

2. Check Trend Context

get_indicators(indicator_code="dmi", symbol=<symbol>, exchange=<exchange>, interval="1D")
get_indicators(indicator_code="ema", symbol=<symbol>, exchange=<exchange>, interval="1D")

Determine if ranging, starting trend, mid-trend, or extended trend to confirm classification.

3. Mark Gap Zone

draw_chart_analysis(action="create", drawing={
    "type": "highlight",
    "points": [
        {"time": <previous_close_time>, "price": <previous_close>},
        {"time": <gap_open_time>, "price": <gap_open>}
    ],
    "options": {"text": "<Gap Type> Gap (+/-X.X%)"}
})

4. Apply Strategy

  • Fade: enter only after the predeclared reversal or failed-break trigger; use the prior close as a scenario target, not an assumed fill.
  • Continuation: define an opening-range length in bars, enter on its closed-bar break, and invalidate on a tested return through the range or gap level.
  • Compare several opening-range lengths in training data only and retain a rule only when it survives held-out costs.

5. Report to Orchestrator

Gap type and rationale, gap size, volume confirmation, strategy recommendation, gap boundaries, fill target, stop level.

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: Research on overnight versus intraday price formation supports treating the open as a distinct information period, not assigning universal fill rates to named gap types.

Key Rules

  • Do not assume the open is noise or that a named gap type has a fixed fill probability.
  • Use a time-stamped session definition and adjusted prior prices.
  • Treat event-driven gaps separately and model opening-auction spread, slippage, and halt risk.
  • A wider stop must reduce position size; never widen it solely to avoid an exit.
  • Return no trade when the gap is too small relative to total execution cost.

Related Skills

  • breakout-trading -- gap-and-go follows breakout principles
  • momentum-trading -- breakaway gaps create momentum moves

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.