htx/technical-analysis
HTX technical indicator analysis engine — 51 indicators + 12 candlestick patterns + 5 BTC cycle indicators + automatic divergence detection, all computed locally in Python.
What this skill does
# Technical Analysis — Indicator Engine v3
Local computation engine, **no API key required**. Pulls data from HTX kline endpoints and computes indicators / patterns / cycles locally with numpy/pandas.
> **Compliance disclaimer**: this skill provides raw indicator values and does not embed any strategy recommendations or trading advice. All decisions are made by the user based on their own risk tolerance.
## Capability overview
| Category | Count | File |
|---|---|---|
| Moving averages | 8 (ma, ema, wma, dema, tema, hma, kama, zlema) | `scripts/indicators.py` |
| Trend | 8 (macd, adx, aroon, cci, supertrend, sar, dpo, envelope) | same |
| Momentum | 10 (rsi, stoch-rsi, stoch, kdj, roc, mom, ppo, trix, wr, uo) | same |
| Volatility | 8 (bb, bbwidth, bbpct, atr, keltner, donchian, hv, stddev) | same |
| Volume | 6 (obv, vwap, mvwap, cmf, mfi, ad) | same |
| Statistics | 5 (lr, slope, angle, variance, sigma) | same |
| Other | 5 (fisher, tr, tp, mp, cho) + divergence | same |
| **Candlestick patterns** | 12 (doji / engulfing / harami / 3-soldiers / 3-crows ...) | `scripts/patterns.py` |
| **BTC cycle** | 5 (ahr999 / ahr999x / rainbow / pi-cycle / mayer) | `scripts/cycle.py` |
| **Indicator total** | **51 indicators + 12 patterns + 5 cycles = 68** | |
## Quick start
### Pull klines + compute indicators
```bash
# 1. Pull BTC/USDT 4-hour klines
htx-cli spot-market kline -p symbol=btcusdt -p period=4hour -p size=300 \
| jq '.data' > /tmp/btc4h.json
# 2. Compute RSI
python scripts/indicators.py rsi --kline /tmp/btc4h.json --params 14
# → {"rsi": 62.4, "ts": 1779000000000}
# 3. Compute MACD (default 12,26,9)
python scripts/indicators.py macd --kline /tmp/btc4h.json
# → {"dif": 320.1, "dea": 245.3, "macd": 149.6, "ts": ...}
# 4. Scan all candlestick patterns
python scripts/patterns.py scan --kline /tmp/btc4h.json
# → {"patterns": ["doji", "bull-engulf"], "ts": ...}
# 5. BTC cycle one-shot full run
python scripts/cycle.py all --kline /tmp/btc1d.json
```
### List all indicators
```bash
python scripts/indicators.py list
# → ["ma", "ema", "rsi", "macd", "supertrend", ...]
```
## Command reference
See `references/`:
- `references/indicators.md` — parameters / return fields / formulas for the 51 technical indicators
- `references/patterns.md` — judgment rules and typical scenarios for the 12 candlestick patterns
- `references/cycle.md` — formulas and interpretation ranges for the 5 BTC cycle indicators
- `references/divergence.md` — automatic divergence detection algorithm and usage notes
## Automatic divergence detection
```bash
python scripts/indicators.py divergence --kline /tmp/btc4h.json --params 14
# → {"divergence": "bull_reg", ...}
```
Return values:
- `bull_reg` — price makes a new low, indicator does not (**bottom reversal signal**)
- `bear_reg` — price makes a new high, indicator does not (**top reversal signal**)
- `bull_hid` — price makes a higher low, indicator a lower low (**pullback within uptrend**)
- `bear_hid` — price makes a lower high, indicator a higher high (**bounce within downtrend**)
## BTC cycle indicators (BTC-USDT only)
All 5 indicators are based on price + time formulas; no on-chain data required:
| Indicator | Use | Interpretation |
|---|---|---|
| `ahr999` | DCA timing | <0.45 bottom-fish / 0.45-1.2 DCA / >1.2 top warning |
| `ahr999x` | Pure cycle signal | Ratio vs fitted curve |
| `rainbow` | 9-band rainbow valuation | "Fire Sale" → "Maximum Bubble" |
| `pi-cycle` | Cycle-top warning | 111d MA crosses above 350d MA × 2 = historical top |
| `mayer` | Long-term valuation | <1 undervalued / >2.4 historical bubble |
## Data requirements
| Indicator type | Min klines |
|---|---|
| Short-period (RSI 14, MACD 26, ATR 14) | 50 bars |
| Long-period (MA200, KAMA) | 200+ bars |
| BTC cycle (Pi Cycle 350d, Mayer 200d) | 350+ daily klines |
| Divergence detection | 50+ bars |
## Typical scenarios
**"How does BTC 4H look technically?"**
```bash
htx-cli spot-market kline -p symbol=btcusdt -p period=4hour -p size=200 | jq '.data' > btc.json
python scripts/indicators.py rsi --kline btc.json
python scripts/indicators.py macd --kline btc.json
python scripts/indicators.py supertrend --kline btc.json
python scripts/patterns.py scan --kline btc.json
python scripts/indicators.py divergence --kline btc.json
# AI synthesizes all outputs to make a judgment
```
**"Is ETH overbought?"**
```bash
python scripts/indicators.py rsi --kline eth4h.json
# rsi > 70 means overbought
```
**"BTC long-term valuation right now"**
```bash
htx-cli spot-market kline -p symbol=btcusdt -p period=1day -p size=400 | jq '.data' > btc1d.json
python scripts/cycle.py all --kline btc1d.json
```
## Relationship with other skills
- **Data source**: depends on `htx/spot-market` or `htx/futures-market` for klines
- **Upper-layer orchestration**: invoked by `htx/ta-master` as the "price/volume" pillar
## Installation
```bash
curl -fsSL https://github.com/htx-exchange/htx-skills-hub/releases/latest/download/install.sh | bash -s -- technical-analysis
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.