$npx -y skills add SKE-Labs/agent-trading-skills --skill multi-timeframe-analysisMap context, setup, and execution states across fixed timeframes. Use when measuring normalized EMA slope, objective structure, closed-bar triggers, and aligned or conflicting states without hand-built confidence scores.
| 1 | # Multi-Timeframe Analysis (MTF) |
| 2 | |
| 3 | Map context, setup, and execution states across fixed timeframes. Higher-timeframe information may help, but it does not automatically dominate; validate aligned and conflicting states separately. |
| 4 | |
| 5 | ## Timeframe Selection |
| 6 | |
| 7 | | Primary TF | Higher TF | Lower TF | Use Case | |
| 8 | | ---------- | --------- | -------- | ---------------- | |
| 9 | | 1D | Weekly | 4H | Position trading | |
| 10 | | 4H | 1D | 1H | Swing trading | |
| 11 | | 1H | 4H | 15m | Intraday swing | |
| 12 | | 15m | 1H | 5m | Day trading | |
| 13 | |
| 14 | Each timeframe should be 4-6x the one below it. Pick one combination and use consistently. |
| 15 | |
| 16 | ## Timeframe Roles |
| 17 | |
| 18 | | Role | Purpose | Focus | |
| 19 | | ----------- | --------------- | ---------------------------------------- | |
| 20 | | **Higher** | Trend direction | Major S/R, overall bias, regime | |
| 21 | | **Primary** | Trade structure | Patterns, setups, key levels | |
| 22 | | **Lower** | Entry timing | Precise entries, confirmation, tight stops | |
| 23 | |
| 24 | ## State Output |
| 25 | |
| 26 | Report each timeframe as bullish, bearish, ranging, or uncertain under its objective rule. Combine them as `aligned`, `mixed`, `counter-context`, or `incomplete`. Do not turn a hand-built score into confidence or position size; size comes from portfolio risk. |
| 27 | |
| 28 | ## Conflict Resolution |
| 29 | |
| 30 | | Conflict | Resolution | |
| 31 | | --- | --- | |
| 32 | | HTF bullish, Primary bearish | Label mixed; evaluate the predeclared mixed-state policy. | |
| 33 | | HTF bearish, LTF bullish | Label counter-context; trade only if that state is validated. | |
| 34 | | HTF ranging, Primary trending | Label mixed; do not map to arbitrary size. | |
| 35 | | All timeframes conflicting | **No trade.** Clarity is a prerequisite. | |
| 36 | |
| 37 | When evidence is incomplete or a state was not validated, return `no trade`. |
| 38 | |
| 39 | ## Workflow |
| 40 | |
| 41 | 1. **Higher TF — establish bias** via EMA stack + slope (no ADX — use the canonical slope computation). `get_indicators` returns one indicator per call — fetch each separately: |
| 42 | ``` |
| 43 | get_candles(symbol=<symbol>, exchange=<exchange>, interval=<htf_interval>, count=120) |
| 44 | get_indicators(indicator_code="ema_21", symbol=<symbol>, exchange=<exchange>, interval=<htf_interval>, count=120) |
| 45 | get_indicators(indicator_code="ema_50", symbol=<symbol>, exchange=<exchange>, interval=<htf_interval>, count=120) |
| 46 | get_indicators(indicator_code="atr_14", symbol=<symbol>, exchange=<exchange>, interval=<htf_interval>, count=120) |
| 47 | get_indicators(indicator_code="donchian_20", symbol=<symbol>, exchange=<exchange>, interval=<htf_interval>, count=120) |
| 48 | ``` |
| 49 | Then compute trend strength via slope %: |
| 50 | ``` |
| 51 | execute python3 -c "ema50=[<...>]; s=(ema50[-1]-ema50[-5])/ema50[-5]*100; print(f'htf_ema50_slope_pct={s:.3f}')" |
| 52 | ``` |
| 53 | Calibrate price/ATR-normalized slope bands in training data, then combine with the EMA stack. Absolute percentage thresholds are not portable across timeframes/assets. |
| 54 | |
| 55 | Mark major HTF S/R: prior swing pivots, donchian_20 boundaries, Fibonacci extensions, weekly open / prior week high-low. |
| 56 | |
| 57 | 2. **Primary TF — find setup** aligned with HTF bias: |
| 58 | ``` |
| 59 | get_candles(symbol=<symbol>, exchange=<exchange>, interval=<primary_interval>, count=60) |
| 60 | get_indicators(indicator_code="ema_9", symbol=<symbol>, exchange=<exchange>, interval=<primary_interval>, count=60) |
| 61 | get_indicators(indicator_code="ema_21", symbol=<symbol>, exchange=<exchange>, interval=<primary_interval>, count=60) |
| 62 | get_indicators(indicator_code="ema_50", symbol=<symbol>, exchange=<exchange>, interval=<primary_interval>, count=60) |
| 63 | get_indicators(indicator_code="rsi_21", symbol=<symbol>, exchange=<exchange>, interval=<primary_interval>, count=60) |
| 64 | get_indicators(indicator_code="macd_fast", symbol=<symbol>, exchange=<exchange>, interval=<primary_interval>, count=60) |
| 65 | get_indicators(indicator_code="atr_14", symbol=<symbol>, exchange=<exchange>, interval=<primary_interval>, count=60) |
| 66 | ``` |
| 67 | If HTF bullish → look for bullish setups (pullbacks to ema_21 / ema_50 / 50-61.8% Fib, demand zones, order blocks). Mark setup zones. |
| 68 | |
| 69 | Cite the RSI / MACD slope as a 3–5 value progression (latest value alone is folklore): |
| 70 | - `RSI21 53.2 (49.8 → 51.4 → 52.9 → 53.2) rising` ← evidence of momentum continuation |
| 71 | - `MACD hist +8.4 (−1.2 → +3.6 → +8.4) accelerating bull` ← evidence of impulse |
| 72 | |
| 73 | 3. **Lower TF — time the entry**: |
| 74 | ``` |
| 75 | get_candles(symbol=<symbol>, exchange=<exchange>, interval=<ltf_interval>, count=20) |
| 76 | get_indicators(indicator_code="rsi_21", symbol=<symbol>, exchange=<exchange>, interval=<ltf_interval>, count=20) |
| 77 | get_indicators(indicator |