$npx -y skills add SKE-Labs/agent-trading-skills --skill gap-tradingIdentify 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 | # Gap Trading |
| 2 | |
| 3 | Trade price gaps by classifying gap type first -- different types require opposite strategies. |
| 4 | |
| 5 | ## Identification |
| 6 | |
| 7 | 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. |
| 8 | |
| 9 | ``` |
| 10 | get_candles_around_date(symbol=<symbol>, exchange=<exchange>, interval="1D", date=<date>) |
| 11 | ``` |
| 12 | |
| 13 | 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. |
| 14 | |
| 15 | ## Gap Classification |
| 16 | |
| 17 | Classify observable context rather than assigning universal fill rates: |
| 18 | |
| 19 | | Context | Evidence to record | Candidate hypothesis | |
| 20 | | --- | --- | --- | |
| 21 | | Range / no catalyst | Gap remains inside an established range | Fade after a defined reversal trigger | |
| 22 | | Level break / catalyst | Gap clears a predeclared level with unusual participation | Continuation after an opening range | |
| 23 | | Extended move | Gap follows an objectively extended trend | Test fade and continuation separately | |
| 24 | |
| 25 | ## Workflow |
| 26 | |
| 27 | ### 1. Detect and Classify |
| 28 | |
| 29 | ``` |
| 30 | get_candles_around_date(symbol=<symbol>, exchange=<exchange>, interval="1D", date=<date>) |
| 31 | get_indicators(indicator_code="mfi", symbol=<symbol>, exchange=<exchange>, interval="1D") |
| 32 | ``` |
| 33 | |
| 34 | Calculate both normalized gap measures. Compare volume with the same time-of-day baseline and document the catalyst from a primary source when available. |
| 35 | |
| 36 | ### 2. Check Trend Context |
| 37 | |
| 38 | ``` |
| 39 | get_indicators(indicator_code="dmi", symbol=<symbol>, exchange=<exchange>, interval="1D") |
| 40 | get_indicators(indicator_code="ema", symbol=<symbol>, exchange=<exchange>, interval="1D") |
| 41 | ``` |
| 42 | |
| 43 | Determine if ranging, starting trend, mid-trend, or extended trend to confirm classification. |
| 44 | |
| 45 | ### 3. Mark Gap Zone |
| 46 | |
| 47 | ``` |
| 48 | draw_chart_analysis(action="create", drawing={ |
| 49 | "type": "highlight", |
| 50 | "points": [ |
| 51 | {"time": <previous_close_time>, "price": <previous_close>}, |
| 52 | {"time": <gap_open_time>, "price": <gap_open>} |
| 53 | ], |
| 54 | "options": {"text": "<Gap Type> Gap (+/-X.X%)"} |
| 55 | }) |
| 56 | ``` |
| 57 | |
| 58 | ### 4. Apply Strategy |
| 59 | |
| 60 | - **Fade**: enter only after the predeclared reversal or failed-break trigger; use the prior close as a scenario target, not an assumed fill. |
| 61 | - **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. |
| 62 | - Compare several opening-range lengths in training data only and retain a rule only when it survives held-out costs. |
| 63 | |
| 64 | ### 5. Report to Orchestrator |
| 65 | |
| 66 | Gap type and rationale, gap size, volume confirmation, strategy recommendation, gap boundaries, fill target, stop level. |
| 67 | |
| 68 | ## Evidence and Validation |
| 69 | |
| 70 | - Treat the setup as a testable hypothesis, not a prediction. Define thresholds, entry, invalidation, and exit before evaluating outcomes. |
| 71 | - Calibrate on the same instrument, venue, session, and timeframe. Use closed candles and a held-out or walk-forward sample; record every variant tried. |
| 72 | - 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. |
| 73 | - Return observed inputs, missing data, cost assumptions, entry, invalidation, exit, and a valid, watch, or no-trade status. |
| 74 | - Research basis: [Research on overnight versus intraday price formation](https://www.sciencedirect.com/science/article/pii/S1059056024006610) supports treating the open as a distinct information period, not assigning universal fill rates to named gap types. |
| 75 | |
| 76 | ## Key Rules |
| 77 | |
| 78 | - Do not assume the open is noise or that a named gap type has a fixed fill probability. |
| 79 | - Use a time-stamped session definition and adjusted prior prices. |
| 80 | - Treat event-driven gaps separately and model opening-auction spread, slippage, and halt risk. |
| 81 | - A wider stop must reduce position size; never widen it solely to avoid an exit. |
| 82 | - Return `no trade` when the gap is too small relative to total execution cost. |
| 83 | |
| 84 | ## Related Skills |
| 85 | |
| 86 | - **breakout-trading** -- gap-and-go follows breakout principles |
| 87 | - **momentum-trading** -- breakaway gaps create momentum moves |