$npx -y skills add SKE-Labs/agent-trading-skills --skill moving-average-crossoverTrade EMA/SMA crossover systems for trend following. Use when identifying trend changes, timing entries with momentum, or building systematic trading rules.
| 1 | # Moving Average Crossover Trading |
| 2 | |
| 3 | MA crossovers provide systematic signals for trend identification and entry timing. |
| 4 | |
| 5 | ## Candidate Combinations |
| 6 | |
| 7 | | Fast MA | Slow MA | Use Case | |
| 8 | | ------- | ------- | ---------------- | |
| 9 | | 5 EMA | 13 EMA | Fast conventional pair | |
| 10 | | 9 EMA | 21 EMA | Medium-fast conventional pair | |
| 11 | | 20 SMA | 50 SMA | Medium conventional pair | |
| 12 | | 50 SMA | 200 SMA | Slow conventional pair | |
| 13 | |
| 14 | These are starting specifications, not style-specific best settings. Record every pair tried and compare against buy-and-hold/cash or an appropriate directional baseline. |
| 15 | |
| 16 | ## Signals |
| 17 | |
| 18 | ### Golden Cross (Bullish) |
| 19 | |
| 20 | - Fast MA crosses above slow MA |
| 21 | - Record price versus both averages as a candidate filter |
| 22 | |
| 23 | ### Death Cross (Bearish) |
| 24 | |
| 25 | - Fast MA crosses below slow MA |
| 26 | - Record price versus both averages as a candidate filter |
| 27 | |
| 28 | ## Strategies |
| 29 | |
| 30 | ### Basic Crossover |
| 31 | - Enter on cross in direction, exit on opposite cross |
| 32 | - Simple but prone to whipsaws in ranges |
| 33 | |
| 34 | ### Price + MA Confirmation |
| 35 | - Wait for crossover, then wait for pullback to fast MA |
| 36 | - Enter on an objectively defined pullback trigger; test whether it changes whipsaw rate and net expectancy |
| 37 | |
| 38 | ### Triple MA System (5-8-13) |
| 39 | - All 3 aligned = ordered-average state; not independent confirmation |
| 40 | - Entry: 5 crosses 8, both above 13 |
| 41 | - Exit: 5 crosses below 8 |
| 42 | |
| 43 | ### MA as Dynamic S/R |
| 44 | - In uptrend: MA acts as support (buy bounces) |
| 45 | - In downtrend: MA acts as resistance (sell rallies) |
| 46 | |
| 47 | ## Workflow |
| 48 | |
| 49 | 1. **Get each chosen average explicitly**: |
| 50 | ``` |
| 51 | get_indicators(indicator_code="ema_<fast>", symbol=<symbol>, exchange=<exchange>, interval=<interval>, count=<enough>) |
| 52 | get_indicators(indicator_code="ema_<slow>", symbol=<symbol>, exchange=<exchange>, interval=<interval>, count=<enough>) |
| 53 | ``` |
| 54 | |
| 55 | 2. **Identify cross** direction and confirm with price position relative to MAs |
| 56 | |
| 57 | 3. **Get candle data** for entry timing: |
| 58 | ``` |
| 59 | get_candles_around_date(symbol=<symbol>, exchange=<exchange>, interval=<interval>, date=<date>) |
| 60 | ``` |
| 61 | |
| 62 | 4. **Enter on pullback** to fast MA (conservative) or on cross (aggressive) |
| 63 | |
| 64 | 5. **Stop loss** beyond recent swing or slow MA. Exit on opposite cross or target. |
| 65 | |
| 66 | 6. **Mark on chart**: |
| 67 | ``` |
| 68 | draw_chart_analysis(action="create", drawing={ |
| 69 | "type": "trend", |
| 70 | "points": [ |
| 71 | {"time": <cross_time>, "price": <cross_price>}, |
| 72 | {"time": <current_time>, "price": <current_ma>} |
| 73 | ], |
| 74 | "options": {"text": "Golden Cross (9/21 EMA)"} |
| 75 | }) |
| 76 | ``` |
| 77 | |
| 78 | ## Evidence and Validation |
| 79 | |
| 80 | - Treat the setup as a testable hypothesis, not a prediction. Define thresholds, entry, invalidation, and exit before evaluating outcomes. |
| 81 | - Calibrate on the same instrument, venue, session, and timeframe. Use closed candles and a held-out or walk-forward sample; record every variant tried. |
| 82 | - 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. |
| 83 | - Return observed inputs, missing data, cost assumptions, entry, invalidation, exit, and a valid, watch, or no-trade status. |
| 84 | - Research basis: The [technical-analysis evidence review](https://papers.ssrn.com/sol3/Delivery.cfm/SSRN_ID603481_code17745.pdf?abstractid=603481) finds mixed market- and era-dependent profitability and highlights transaction costs and data snooping. |
| 85 | |
| 86 | ## Key Rules |
| 87 | |
| 88 | - Use a regime filter only if it adds held-out net value; ADX does not confirm trend by itself. |
| 89 | - A crossover rule must specify closed-bar timing, order timing, stop, exit, and warm-up. |
| 90 | - Faster averages react sooner and trade more often; reliability is empirical after costs. |
| 91 | - EMA weights recent data more heavily; SMA weights its window equally. |
| 92 | - Test additional features incrementally and control parameter/data-snooping risk. |
| 93 | |
| 94 | ## Related Skills |
| 95 | |
| 96 | - **market-regime-detection** — MA crossovers only work in trending regimes; check ADX before trading |
| 97 | - **macd-trading** — MACD is derived from EMAs and provides complementary momentum confirmation |