$npx -y skills add SKE-Labs/agent-trading-skills --skill ichimoku-cloudCalculate and test correctly shifted Ichimoku components. Use when evaluating price/cloud, TK-cross, Chikou, and cloud-state features without future leakage or confirmation-count scoring.
| 1 | # Ichimoku Cloud Trading |
| 2 | |
| 3 | Ichimoku Kinko Hyo provides trend, momentum, and S/R in one indicator system. |
| 4 | |
| 5 | ## Components |
| 6 | |
| 7 | | Component | Formula | Use | |
| 8 | | --------------- | ------------------------------ | ---------------- | |
| 9 | | **Tenkan-sen** | (9H + 9L) / 2 | Fast signal line | |
| 10 | | **Kijun-sen** | (26H + 26L) / 2 | Slow signal line | |
| 11 | | **Senkou A** | (Tenkan + Kijun) / 2, plotted 26 ahead | Cloud boundary | |
| 12 | | **Senkou B** | (52H + 52L) / 2, plotted 26 ahead | Cloud boundary | |
| 13 | | **Chikou Span** | Close plotted 26 periods back | Confirmation | |
| 14 | |
| 15 | ## Cloud (Kumo) Analysis |
| 16 | |
| 17 | | Cloud Color | Meaning | |
| 18 | | ------------- | ------------------------- | |
| 19 | | Green (A > B) | Senkou A above Senkou B; bullish-context feature | |
| 20 | | Red (A < B) | Senkou A below Senkou B; bearish-context feature | |
| 21 | | Thin/thick cloud | Relative spread between Senkou spans; test any S/R interpretation | |
| 22 | |
| 23 | ## Signals |
| 24 | |
| 25 | ### TK Cross (Tenkan/Kijun) |
| 26 | |
| 27 | - **Bullish feature**: Tenkan crosses above Kijun; record cloud location as context |
| 28 | - **Bearish feature**: Tenkan crosses below Kijun; record cloud location as context |
| 29 | |
| 30 | ### Price vs Cloud |
| 31 | |
| 32 | - Above cloud = bullish bias |
| 33 | - Below cloud = bearish bias |
| 34 | - Inside cloud = overlap state; apply the calibrated policy |
| 35 | |
| 36 | ### Chikou Span Confirmation |
| 37 | |
| 38 | - Chikou above price (26 bars ago) = bullish |
| 39 | - Chikou below price (26 bars ago) = bearish |
| 40 | |
| 41 | ### Component State Checklist |
| 42 | |
| 43 | | Condition | Bullish | Bearish | |
| 44 | | -------------- | ----------- | ----------- | |
| 45 | | Price position | Above cloud | Below cloud | |
| 46 | | TK cross | Bullish | Bearish | |
| 47 | | Chikou span | Above price | Below price | |
| 48 | | Cloud ahead | Green | Red | |
| 49 | |
| 50 | These components share the same price history and are not independent votes. Preserve the four states but assign strength only if a calibrated model supports it. |
| 51 | |
| 52 | ## Workflow |
| 53 | |
| 54 | 1. **Get at least 120 closed candles** to calculate components and their plotted shifts: |
| 55 | ``` |
| 56 | get_candles(symbol=<symbol>, exchange=<exchange>, interval=<interval>, count=120) |
| 57 | ``` |
| 58 | Compute rolling highest-high/lowest-low midpoints. Plot Senkou spans 26 bars ahead and Chikou 26 bars back. When backtesting, compare each decision timestamp only with values computable then; never use the future plotted location as future information. |
| 59 | |
| 60 | 2. **Assess price versus the correctly aligned current cloud**, not the unshifted calculations |
| 61 | |
| 62 | 3. **Record TK cross and Chikou relation** as correlated features |
| 63 | |
| 64 | 4. **Apply the predeclared closed-bar entry and structural invalidation**; a line touch is not enough. |
| 65 | |
| 66 | 5. **Mark on chart**: |
| 67 | ``` |
| 68 | draw_chart_analysis(action="create", drawing={ |
| 69 | "type": "support", |
| 70 | "points": [ |
| 71 | {"time": <start_time>, "price": <kijun_price>}, |
| 72 | {"time": <end_time>, "price": <kijun_price>} |
| 73 | ], |
| 74 | "options": {"text": "Kijun Support"} |
| 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 results vary by market and testing design; Ichimoku settings and confirmation rules require the same out-of-sample scrutiny. |
| 85 | |
| 86 | ## Key Rules |
| 87 | |
| 88 | - Treat inside-cloud status as a testable filter, not a universal prohibition. |
| 89 | - Test 9/26/52 and chosen timeframes on the intended session; no 4H minimum is universal. |
| 90 | - Use cloud edges as candidate coordinates and stop only at thesis invalidation. |
| 91 | - Do not convert component agreement directly into confidence or size. |
| 92 | |
| 93 | ## Related Skills |
| 94 | |
| 95 | - **multi-timeframe-analysis** — Ichimoku across timeframes for alignment |
| 96 | - **moving-average-crossover** — TK cross is analogous to MA crossovers; combine for confirmation |