$npx -y skills add SKE-Labs/agent-trading-skills --skill stochastic-tradingDefine and test Stochastic percent-K/percent-D states, crosses, and divergence. Use when calibrating oscillator bands, trend interactions, closed-bar entries, exits, and turnover.
| 1 | # Stochastic Oscillator Trading |
| 2 | |
| 3 | Stochastic measures momentum by comparing closing price to the price range over a period. |
| 4 | |
| 5 | ## Components |
| 6 | |
| 7 | | Line | Description | Use | |
| 8 | | ---- | ------------------------- | -------------- | |
| 9 | | %K | Main line (fast) | Primary signal | |
| 10 | | %D | Signal line (3-SMA of %K) | Confirmation | |
| 11 | |
| 12 | ## Signals |
| 13 | |
| 14 | ### Overbought/Oversold Reversals |
| 15 | |
| 16 | - Define low/high bands from training data or use 20/80 only as conventional seeds; a cross creates a candidate trigger, not an automatic trade |
| 17 | |
| 18 | ### %K/%D Crossover |
| 19 | |
| 20 | - %K crosses above %D → bullish feature; test interaction with oscillator zone |
| 21 | - %K crosses below %D → bearish |
| 22 | |
| 23 | ### Divergence |
| 24 | |
| 25 | - Price new high + Stochastic lower high → bearish |
| 26 | - Price new low + Stochastic higher low → bullish |
| 27 | |
| 28 | ### Momentum |
| 29 | |
| 30 | - %K above 50 and rising → bullish momentum |
| 31 | - %K below 50 and falling → bearish momentum |
| 32 | |
| 33 | ## Market-Specific Strategies |
| 34 | |
| 35 | ### Ranging Markets |
| 36 | - Apply calibrated low/high exit-cross rules |
| 37 | - Target: opposite zone |
| 38 | |
| 39 | ### Trending Markets |
| 40 | - Define trend objectively and test trend-direction filters; persistent extremes are possible |
| 41 | |
| 42 | ## Workflow |
| 43 | |
| 44 | 1. **Get Stochastic**: |
| 45 | ``` |
| 46 | get_indicators(indicator_code="stoch", symbol=<symbol>, exchange=<exchange>, interval=<interval>) |
| 47 | ``` |
| 48 | |
| 49 | 2. **Determine market type** (trending vs ranging) to select strategy |
| 50 | |
| 51 | 3. **Check for %K/%D cross** in OB/OS zone |
| 52 | |
| 53 | 4. **Confirm with candle data**: |
| 54 | ``` |
| 55 | get_candles_around_date(symbol=<symbol>, exchange=<exchange>, interval=<interval>, date=<date>) |
| 56 | ``` |
| 57 | |
| 58 | 5. **Enter with confirmation** candle; stop beyond recent swing |
| 59 | |
| 60 | ## Evidence and Validation |
| 61 | |
| 62 | - Treat the setup as a testable hypothesis, not a prediction. Define thresholds, entry, invalidation, and exit before evaluating outcomes. |
| 63 | - Calibrate on the same instrument, venue, session, and timeframe. Use closed candles and a held-out or walk-forward sample; record every variant tried. |
| 64 | - 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. |
| 65 | - Return observed inputs, missing data, cost assumptions, entry, invalidation, exit, and a valid, watch, or no-trade status. |
| 66 | - Research basis: The [technical-rule evidence](https://pmc.ncbi.nlm.nih.gov/articles/PMC4583561/) finds stochastic-rule performance differs across markets and is not reliably positive after transaction costs. |
| 67 | |
| 68 | ## Key Rules |
| 69 | |
| 70 | - Never trade from an extreme label alone; require the predeclared closed-bar rule. |
| 71 | - Calibrate divergence pivots, spacing, and oscillator bands. |
| 72 | - Test with/against-trend variants rather than assuming the filter adds edge. |
| 73 | - Treat 14/3/3 as a conventional baseline; record all parameter variants and turnover. |
| 74 | |
| 75 | ## Related Skills |
| 76 | |
| 77 | - **rsi-divergence** — Stochastic divergence + RSI divergence together strengthens reversal signals |
| 78 | - **bollinger-bands** — test stochastic state at volatility-envelope extremes as a combined feature |