Ashares Technical Indicators
ashares_technical_indicatorsTechnical indicators for Chinese A-share stocks and ETFs (均线/布林/MACD/KDJ) — MA (moving averages, any windows, default MA5/MA10/MA20/MA60), BOLL (Bollinger Bands, default 20-period ×2 std dev), MACD (DIF/DEA/柱, default 12/26/9), and KDJ (K/D/J, default 9/3/3), computed from this pack's own daily OHLCV history (same source and codes as ashares_daily_history — ETF codes like 515050/588170/561980 work the same as stock codes). Answers '515050通信ETF华夏最近20个交易日MA5/MA10/MA20/BOLL/MACD/KDJ', '603986兆易创新周线MACD是否死叉', 'MA20 and BOLL for an A-share ETF', '布林带', '均线', '金叉死叉'. Internally fetches extra lookback history before start so the indicators are warmed up (MA60/MACD need ~60+ trading days of prior data) — only the requested [start, end] range is returned. MACD histogram uses the common Chinese charting convention 柱=2×(DIF−DEA); KDJ smoothing is the standard 3/3 recursive form seeded at 50. Up to 5 comma-separated codes per call (indicator math is heavier than a plain OHLCV pull). Source: Tencent/gtimg fqkline (keyless), same as ashares_daily_history.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | End date, YYYY-MM-DD or YYYYMMDD (inclusive). Default: today. | |
| codes | Yes | One 6-digit code or a comma-separated list, up to 5, e.g. "515050" or "600519,300750". sh/sz/bj prefixes accepted but optional. ETF codes work the same as stock codes. | |
| kdj_n | No | KDJ RSV lookback period, default 9. | |
| start | Yes | Start date for the RETURNED indicator range, YYYY-MM-DD or YYYYMMDD (inclusive). Extra history before this date is fetched automatically to warm up the indicators. | |
| adjust | No | Price adjustment for splits/dividends: qfq = forward-adjusted (default), hfq = backward-adjusted, none = raw. | |
| kdj_m1 | No | KDJ K smoothing factor, default 3. | |
| kdj_m2 | No | KDJ D smoothing factor, default 3. | |
| boll_mult | No | BOLL standard-deviation multiplier, default 2. | |
| macd_fast | No | MACD fast EMA period, default 12. | |
| macd_slow | No | MACD slow EMA period, default 26. | |
| indicators | No | Which indicator families to compute. Default: all four. | |
| ma_windows | No | MA window lengths in trading days. Default [5, 10, 20, 60]. | |
| boll_period | No | BOLL period, default 20. | |
| macd_signal | No | MACD signal (DEA) EMA period, default 9. |