34 KiB
34 KiB
Wickra 指标速查手册(Python API)
用途:AI 写量化指标时,直接查这里复用,不用手搓。 安装:
pip install wickra(零第三方依赖,不需要 numpy) 版本:0.9.9 | 指标总数:514
通用调用模式
import wickra as ta
# ── Streaming(实时逐 tick,O(1))──────────────────────
ind = ta.RSI(14) # 构造:参数在此时固定
value = ind.update(price) # 返回 None(warmup)或 float
ind.is_ready() # 是否已过 warmup
ind.warmup_period() # warmup 需要多少根 K 线
ind.reset() # 重置到初始状态
# ── Batch(历史回测,等价于循环 update)────────────────
values = ta.RSI(14).batch(close) # 返回 array.array('d'),warmup 位为 NaN
# numpy 零拷贝:np.asarray(values)
# ── 输入类型 ──────────────────────────────────────────
# f64 指标:update(price: float) → batch(close)
# Candle 指标:update(candle) → batch(high, low, close[, volume])
# candle 可以是 dict 或 tuple:
# {"open":o, "high":h, "low":l, "close":c, "volume":v}
# (o, h, l, c, v, timestamp)
# ── 多输出指标 ────────────────────────────────────────
# batch 返回 Matrix(shape 属性 + [i,j] 访问)
# update 返回 tuple,如 MACD → (macd, signal, histogram)
1. 趋势指标(Trend)— 20 个
| 指标 | 构造 | 输入类型 | 输出 | 用途 |
|---|---|---|---|---|
SMA |
SMA(period) |
f64 | float | 简单移动平均 |
EMA |
EMA(period) |
f64 | float | 指数移动平均(最常用) |
WMA |
WMA(period) |
f64 | float | 加权移动平均 |
DEMA |
DEMA(period) |
f64 | float | 双指数移动平均 |
TEMA |
TEMA(period) |
f64 | float | 三指数移动平均 |
HMA |
HMA(period) |
f64 | float | Hull 移动平均(低延迟) |
KAMA |
KAMA(er_period=10, fast=2, slow=30) |
f64 | float | Kaufman 自适应移动平均 |
SMMA |
SMMA(period) |
f64 | float | 平滑移动平均 |
TRIMA |
TRIMA(period) |
f64 | float | 三角移动平均 |
ZLEMA |
ZLEMA(period) |
f64 | float | 零滞后 EMA |
T3 |
T3(period, v=0.7) |
f64 | float | Tillson T3 移动平均 |
VWMA |
VWMA(period) |
Candle | float | 成交量加权移动平均 |
ALMA |
ALMA(period, ...) |
f64 | float | Arnaud Legoux 移动平均 |
McGinleyDynamic |
McGinleyDynamic(period) |
f64 | float | McGinley 动态平均 |
FRAMA |
FRAMA(period, ...) |
f64 | float | 分形自适应移动平均 |
VIDYA |
VIDYA(period, ...) |
f64 | float | 变异指数动态平均 |
JMA |
JMA(period, ...) |
f64 | float | Jurik 移动平均(超低延迟) |
Alligator |
Alligator(...) |
f64 | (jaw,teeth,lips) | Bill Williams 鳄鱼指标 |
EVWMA |
EVWMA(period) |
Candle | float | 弹性成交量加权移动平均 |
TDMovingAverage |
TDMovingAverage(...) |
Candle | float | DeMark 移动平均 |
QuantDinger 对应:
# QuantDinger: df["close"].ewm(span=14, adjust=False).mean()
# Wickra: ta.EMA(14).batch(close)
# 或流式: ema = ta.EMA(14); ema.update(price)
2. 动量指标(Momentum)— 40+ 个
| 指标 | 构造 | 输入类型 | 输出 | 用途 |
|---|---|---|---|---|
RSI |
RSI(period=14) |
f64 | float | 相对强弱指数 |
AnchoredRSI |
AnchoredRSI(period=14) |
f64 | float | 锚定 RSI |
MACD |
MACD(fast=12, slow=26, signal=9) |
f64 | (macd,signal,hist) | MACD |
MACDFIX |
MACDFIX(...) |
f64 | tuple | 修正 MACD |
MACDEXT |
MACDEXT(...) |
f64 | tuple | 扩展 MACD |
Stochastic |
Stochastic(k_period=14, d_period=3) |
Candle | (k,d) | 随机指标 K&D |
CCI |
CCI(period=20) |
Candle | float | 商品通道指数 |
ROC |
ROC(period=10) |
f64 | float | 变化率 |
WilliamsR |
WilliamsR(period=14) |
Candle | float | 威廉 %R |
ADX |
ADX(period=14) |
Candle | (plus_di,minus_di,adx) | 平均方向指数 |
ADXR |
ADXR(period=14) |
Candle | tuple | ADX 评级 |
PLUS_DM / MINUS_DM |
(period=14) |
Candle | float | 正/负方向运动 |
MFI |
MFI(period=14) |
Candle | float | 资金流量指数 |
TRIX |
TRIX(period=30) |
f64 | float | 三重指数平滑 |
AwesomeOscillator |
AwesomeOscillator(fast=5, slow=34) |
Candle | float | 动量振荡器 |
Aroon |
Aroon(period=14) |
Candle | (up,down) | Aroon 上下 |
AroonOscillator |
AroonOscillator(period=14) |
Candle | float | Aroon 振荡器 |
MOM |
MOM(period=10) |
f64 | float | 动量 |
CMO |
CMO(period=14) |
f64 | float | 钱德动量振荡器 |
TSI |
TSI(long=25, short=13) |
f64 | float | 真实强度指数 |
PMO |
PMO(smoothing1=35, smoothing2=20) |
f64 | float | 价格动量振荡器 |
TII |
TII(period, ...) |
f64 | float | 趋势强度指数 |
KST |
KST(...) |
f64 | tuple | 确知确定指标 |
StochRSI |
StochRSI(rsi_period=14, stoch_period=14) |
f64 | float | 随机 RSI |
UltimateOscillator |
UltimateOscillator(short=7, mid=14, long=28) |
Candle | float | 终极振荡器 |
RVI |
RVI(period=14) |
Candle | tuple | 相对活力指数 |
PGO |
PGO(period=14) |
f64 | float | 漂移振荡器 |
SMI |
SMI(period, ...) |
f64 | float | 随机动量指数 |
LaguerreRSI |
LaguerreRSI(...) |
f64 | float | 拉格朗日 RSI |
ConnorsRSI |
ConnorsRSI(...) |
f64 | float | Connors RSI |
Inertia |
Inertia(period, ...) |
f64 | float | 惯性指标 |
APO |
APO(fast=12, slow=26) |
f64 | float | 绝对价格振荡器 |
PPO |
PPO(fast=12, slow=26) |
f64 | float | 百分比价格振荡器 |
DPO |
DPO(period=20) |
f64 | float | 去趋势价格振荡器 |
CFO |
CFO(period, ...) |
f64 | float | 变化力振荡器 |
Coppock |
Coppock(roc_long=14, roc_short=11, wma_period=10) |
f64 | float | Coppock 曲线 |
ZeroLagMACD |
ZeroLagMACD(...) |
f64 | tuple | 零滞后 MACD |
ElderImpulse |
ElderImpulse(...) |
Candle | tuple | Elder 脉冲系统 |
STC |
STC(...) |
f64 | tuple | Schaff 趋势周期 |
Vortex |
Vortex(period=14) |
Candle | (plus,minus) | 涡流指标 |
RWI |
RWI(period, ...) |
Candle | tuple | 随机游走指数 |
WaveTrend |
WaveTrend(...) |
Candle | (wt1,wt2) | 波浪趋势 |
MassIndex |
MassIndex(ema_period=9, sum_period=25) |
Candle | float | 质量指数 |
AcceleratorOscillator |
AcceleratorOscillator(...) |
Candle | float | 加速振荡器 |
BalanceOfPower |
BalanceOfPower() |
Candle | float | 力量平衡 |
ChoppinessIndex |
ChoppinessIndex(period=14) |
Candle | float | 砍伐指数 |
VerticalHorizontalFilter |
VerticalHorizontalFilter(period=28) |
f64 | float | 垂直水平过滤 |
FisherRSI |
FisherRSI(...) |
f64 | float | Fisher RSI |
RSX |
RSX(period, ...) |
f64 | float | RSX(平滑 RSI) |
RMI |
RMI(period, ...) |
f64 | float | 相对动量指数 |
StochasticCCI |
StochasticCCI(...) |
Candle | float | 随机 CCI |
DynamicMomentumIndex |
DynamicMomentumIndex(...) |
Candle | float | 动态动量指数 |
DerivativeOscillator |
DerivativeOscillator(...) |
f64 | float | 导数振荡器 |
ElderRay |
ElderRay(period, ...) |
Candle | tuple | Elder Ray |
QQE |
QQE(period, ...) |
f64 | tuple | 量化定性估计 |
DisparityIndex |
DisparityIndex(period, ...) |
f64 | float | 差异指数 |
3. 波动率指标(Volatility)— 25+ 个
| 指标 | 构造 | 输入类型 | 输出 | 用途 |
|---|---|---|---|---|
BollingerBands |
BollingerBands(period=20, multiplier=2.0) |
f64 | (upper,mid,lower,stddev) | 布林带 |
BollingerBandwidth |
BollingerBandwidth(period=20, multiplier=2.0) |
f64 | float | 布林带宽度 |
PercentB |
PercentB(period=20, multiplier=2.0) |
f64 | float | %B 指标 |
ATR |
ATR(period=14) |
Candle | float | 平均真实范围 |
NATR |
NATR(period=14) |
Candle | float | 归一化 ATR |
TrueRange |
TrueRange() |
Candle | float | 真实范围 |
Keltner |
Keltner(ema_period=20, atr_period=10, multiplier=2.0) |
Candle | (upper,mid,lower) | Keltner 通道 |
Donchian |
Donchian(period=20) |
Candle | (upper,mid,lower) | 唐奇安通道 |
PSAR |
PSAR(af_start=0.02, af_step=0.02, af_max=0.20) |
Candle | float | 抛物线 SAR |
SAREXT |
SAREXT(...) |
Candle | float | 扩展 SAR |
StdDev |
StdDev(period=20) |
f64 | float | 标准差 |
Variance |
Variance(period, ...) |
f64 | float | 方差 |
UlcerIndex |
UlcerIndex(period=14) |
f64 | float | 溃疡指数 |
HistoricalVolatility |
HistoricalVolatility(period=20, trading_periods=252) |
f64 | float | 历史波动率 |
ChaikinVolatility |
ChaikinVolatility(ema_period=10, roc_period=10) |
Candle | float | 蔡金波动率 |
RVIVolatility |
RVIVolatility(period, ...) |
Candle | float | RVI 波动率 |
ParkinsonVolatility |
ParkinsonVolatility(period, ...) |
Candle | float | Parkinson 波动率 |
GarmanKlassVolatility |
GarmanKlassVolatility(period, ...) |
Candle | float | Garman-Klass 波动率 |
RogersSatchellVolatility |
RogersSatchellVolatility(period, ...) |
Candle | float | Rogers-Satchell 波动率 |
YangZhangVolatility |
YangZhangVolatility(period, ...) |
Candle | float | Yang-Zhang 波动率 |
Garch11 |
Garch11(...) |
f64 | float | GARCH(1,1) |
EwmaVolatility |
EwmaVolatility(...) |
f64 | float | EWMA 波动率 |
VolatilityCone |
VolatilityCone(period, ...) |
Candle | tuple | 波动率锥 |
VolatilityRatio |
VolatilityRatio(period, ...) |
Candle | float | 波动率比 |
VolatilityOfVolatility |
VolatilityOfVolatility(period, ...) |
f64 | float | 波动率的波动率 |
BipowerVariation |
BipowerVariation(period, ...) |
f64 | float | 双幂变差 |
RealizedVolatility |
RealizedVolatility(period, ...) |
f64 | float | 已实现波动率 |
4. 追踪止损(Trailing Stops)— 15 个
| 指标 | 构造 | 输入类型 | 输出 | 用途 |
|---|---|---|---|---|
SuperTrend |
SuperTrend(atr_period=10, multiplier=3.0) |
Candle | (value,direction) | SuperTrend |
ChandelierExit |
ChandelierExit(period=22, multiplier=3.0) |
Candle | (long_stop,short_stop) | 吊灯退出 |
ChandeKrollStop |
ChandeKrollStop(atr_period=10, atr_mult=1.0, stop_period=9) |
Candle | (stop_long,stop_short) | Chande-Kroll 止损 |
AtrTrailingStop |
AtrTrailingStop(atr_period=14, multiplier=3.0) |
Candle | float | ATR 追踪止损 |
AtrRatchet |
AtrRatchet(...) |
Candle | tuple | ATR 棘轮止损 |
ElderSafeZone |
ElderSafeZone(...) |
Candle | tuple | Elder 安全区止损 |
DonchianStop |
DonchianStop(period, ...) |
Candle | tuple | 唐奇安止损 |
HiLoActivator |
HiLoActivator(period, ...) |
Candle | tuple | 高低激活器 |
VoltyStop |
VoltyStop(...) |
Candle | tuple | 波动率止损 |
YoyoExit |
YoyoExit(...) |
Candle | tuple | Yoyo 退出 |
ModifiedMaStop |
ModifiedMaStop(...) |
Candle | tuple | 修正 MA 止损 |
Nrtr |
Nrtr(...) |
Candle | tuple | NRTR 止损 |
PercentageTrailingStop |
PercentageTrailingStop(...) |
Candle | tuple | 百分比追踪止损 |
StepTrailingStop |
StepTrailingStop(...) |
f64 | float | 阶梯追踪止损 |
RenkoTrailingStop |
RenkoTrailingStop(...) |
f64 | float | Renko 追踪止损 |
KaseDevStop |
KaseDevStop(...) |
Candle | tuple | Kase 偏差止损 |
5. 成交量指标(Volume)— 25+ 个
| 指标 | 构造 | 输入类型 | 输出 | 用途 |
|---|---|---|---|---|
OBV |
OBV() |
Candle | float | 能量潮 |
VWAP |
VWAP() |
Candle | float | 成交量加权平均价 |
RollingVWAP |
RollingVWAP(period) |
Candle | float | 滚动 VWAP |
AnchoredVWAP |
AnchoredVWAP(...) |
Candle | float | 锚定 VWAP |
ADL |
ADL() |
Candle | float | 累积/派发线 |
ChaikinMoneyFlow |
ChaikinMoneyFlow(period=20) |
Candle | float | 蔡金资金流 |
ChaikinOscillator |
ChaikinOscillator(fast=3, slow=10) |
Candle | float | 蔡金振荡器 |
ForceIndex |
ForceIndex(period=13) |
Candle | float | 力量指数 |
VolumePriceTrend |
VolumePriceTrend() |
Candle | float | 成交量价格趋势 |
VolumeRsi |
VolumeRsi(period, ...) |
Candle | float | 成交量 RSI |
VolumeOscillator |
VolumeOscillator(...) |
Candle | float | 成交量振荡器 |
VolumeWeightedMacd |
VolumeWeightedMacd(...) |
Candle | tuple | 成交量加权 MACD |
BetterVolume |
BetterVolume(...) |
Candle | tuple | Better Volume |
IntradayIntensity |
IntradayIntensity(...) |
Candle | float | 日内强度 |
TradeVolumeIndex |
TradeVolumeIndex(...) |
Candle | float | 交易量指数 |
TwiggsMoneyFlow |
TwiggsMoneyFlow(period, ...) |
Candle | float | Twiggs 资金流 |
KVO |
KVO(...) |
Candle | float | Klinger 成交量振荡器 |
NVI / PVI |
NVI() / PVI() |
Candle | float | 负/正成交量指数 |
ADOSC |
ADOSC(...) |
Candle | float | AD 振荡器 |
DemandIndex |
DemandIndex(...) |
Candle | float | 需求指数 |
TSV |
TSV(period, ...) |
Candle | float | 时间分割成交量 |
VZO |
VZO(period, ...) |
Candle | float | 成交量区域振荡器 |
MarketFacilitationIndex |
MarketFacilitationIndex() |
Candle | float | 市场便利指数 |
EaseOfMovement |
EaseOfMovement(period=14, divisor=1e8) |
Candle | float | 简易波动指标 |
Wad |
Wad() |
Candle | float | Williams AD |
6. 统计指标(Statistics)— 30+ 个
| 指标 | 构造 | 输入类型 | 输出 | 用途 |
|---|---|---|---|---|
LinearRegression |
LinearRegression(period=14) |
f64 | float | 线性回归 |
LinRegSlope |
LinRegSlope(period=14) |
f64 | float | 线性回归斜率 |
LinRegAngle |
LinRegAngle(period=14) |
f64 | float | 线性回归角度 |
ZScore |
ZScore(period=20) |
f64 | float | Z 分数 |
Variance |
Variance(period, ...) |
f64 | float | 方差 |
CoefficientOfVariation |
CoefficientOfVariation(period, ...) |
f64 | float | 变异系数 |
Skewness |
Skewness(period, ...) |
f64 | float | 偏度 |
Kurtosis |
Kurtosis(period, ...) |
f64 | float | 峰度 |
StandardError |
StandardError(period, ...) |
f64 | float | 标准误差 |
DetrendedStdDev |
DetrendedStdDev(period, ...) |
f64 | float | 去趋势标准差 |
RSquared |
RSquared(period, ...) |
f64 | float | R² |
Autocorrelation |
Autocorrelation(period, ...) |
f64 | float | 自相关 |
MedianAbsoluteDeviation |
MedianAbsoluteDeviation(period, ...) |
f64 | float | 中位数绝对偏差 |
HurstExponent |
HurstExponent(period, ...) |
f64 | float | Hurst 指数 |
PearsonCorrelation |
PearsonCorrelation(period, ...) |
tuple | float | 皮尔逊相关 |
SpearmanCorrelation |
SpearmanCorrelation(period, ...) |
tuple | float | 斯皮尔曼相关 |
Beta |
Beta(period, ...) |
tuple | float | Beta 系数 |
PairwiseBeta |
PairwiseBeta(period, ...) |
tuple | float | 配对 Beta |
Cointegration |
Cointegration(period, ...) |
tuple | tuple | 协整 |
RollingCovariance |
RollingCovariance(period, ...) |
tuple | float | 滚动协方差 |
RollingCorrelation |
RollingCorrelation(period, ...) |
tuple | float | 滚动相关 |
KendallTau |
KendallTau(period, ...) |
tuple | float | Kendall τ |
GrangerCausality |
GrangerCausality(period, ...) |
tuple | tuple | 格兰杰因果 |
VarianceRatio |
VarianceRatio(period, ...) |
tuple | tuple | 方差比 |
BetaNeutralSpread |
BetaNeutralSpread(period, ...) |
tuple | float | Beta 中性价差 |
KalmanHedgeRatio |
KalmanHedgeRatio(...) |
tuple | tuple | Kalman 对冲比 |
TypicalPrice |
TypicalPrice() |
Candle | float | 典型价格 (H+L+C)/3 |
MedianPrice |
MedianPrice() |
Candle | float | 中位价格 (H+L)/2 |
WeightedClose |
WeightedClose() |
Candle | float | 加权收盘 (H+L+2C)/4 |
RollingQuantile |
RollingQuantile(period, ...) |
f64 | float | 滚动分位数 |
RollingPercentileRank |
RollingPercentileRank(period, ...) |
f64 | float | 滚动百分位排名 |
RollingIqr |
RollingIqr(period, ...) |
f64 | float | 滚动四分位距 |
JarqueBera |
JarqueBera(period, ...) |
f64 | float | Jarque-Bera 检验 |
7. Ehlers / 周期指标(Cycle)— 18 个
| 指标 | 构造 | 用途 |
|---|---|---|
SuperSmoother |
SuperSmoother(period, ...) |
Ehlers 超级平滑器 |
FisherTransform |
FisherTransform(period, ...) |
Fisher 变换 |
InverseFisherTransform |
InverseFisherTransform(...) |
逆 Fisher 变换 |
Decycler |
Decycler(period, ...) |
去周期器 |
DecyclerOscillator |
DecyclerOscillator(period, ...) |
去周期振荡器 |
RoofingFilter |
RoofingFilter(...) |
屋顶滤波器 |
CenterOfGravity |
CenterOfGravity(period, ...) |
重心 |
CyberneticCycle |
CyberneticCycle(period, ...) |
控制论周期 |
InstantaneousTrendline |
InstantaneousTrendline(...) |
瞬时趋势线 |
EhlersStochastic |
EhlersStochastic(...) |
Ehlers 随机指标 |
EmpiricalModeDecomposition |
EmpiricalModeDecomposition(...) |
经验模态分解 |
HilbertDominantCycle |
HilbertDominantCycle(...) |
Hilbert 主周期 |
HT_DCPHASE |
HT_DCPHASE(...) |
Hilbert DC 相位 |
HT_PHASOR |
HT_PHASOR(...) |
Hilbert 相量 |
HT_TRENDMODE |
HT_TRENDMODE(...) |
Hilbert 趋势模式 |
AdaptiveCycle |
AdaptiveCycle(...) |
自适应周期 |
SineWave |
SineWave(...) |
正弦波指标 |
MAMA / FAMA |
MAMA(...) / FAMA(...) |
MESA 自适应移动平均 |
8. 带状 & 通道指标(Bands & Channels)— 15 个
| 指标 | 构造 | 输出 | 用途 |
|---|---|---|---|
ProjectionBands |
ProjectionBands(period, ...) |
(upper,lower) | 投影带 |
MedianChannel |
MedianChannel(period, ...) |
tuple | 中位数通道 |
BomarBands |
BomarBands(period, ...) |
tuple | Bomar 带 |
QuartileBands |
QuartileBands(period, ...) |
tuple | 四分位带 |
MaEnvelope |
MaEnvelope(period, ...) |
tuple | 移动平均包络 |
AccelerationBands |
AccelerationBands(period, ...) |
tuple | 加速度带 |
StarcBands |
StarcBands(period, ...) |
tuple | STARC 带 |
AtrBands |
AtrBands(period, ...) |
tuple | ATR 带 |
HurstChannel |
HurstChannel(period, ...) |
tuple | Hurst 通道 |
LinRegChannel |
LinRegChannel(period, ...) |
tuple | 线性回归通道 |
StandardErrorBands |
StandardErrorBands(period, ...) |
tuple | 标准误差带 |
DoubleBollinger |
DoubleBollinger(period, ...) |
tuple | 双布林带 |
TtmSqueeze |
TtmSqueeze(period, ...) |
tuple | TTM 挤压 |
FractalChaosBands |
FractalChaosBands(period, ...) |
tuple | 分形混沌带 |
VwapStdDevBands |
VwapStdDevBands(period, ...) |
tuple | VWAP 标准差带 |
9. 枢轴 & 支撑阻力(Pivots & S/R)— 12 个
| 指标 | 构造 | 用途 |
|---|---|---|
ClassicPivots |
ClassicPivots() |
经典枢轴点 |
FibonacciPivots |
FibonacciPivots() |
斐波那契枢轴 |
Camarilla |
Camarilla() |
Camarilla 枢轴 |
WoodiePivots |
WoodiePivots() |
Woodie 枢轴 |
DemarkPivots |
DemarkPivots() |
DeMark 枢轴 |
CentralPivotRange |
CentralPivotRange(period, ...) |
中央枢轴范围 |
PivotReversal |
PivotReversal(...) |
枢轴反转 |
VolumeWeightedSr |
VolumeWeightedSr(period, ...) |
成交量加权支撑阻力 |
AndrewsPitchfork |
AndrewsPitchfork(...) |
Andrews 干草叉 |
MurreyMathLines |
MurreyMathLines(...) |
Murrey 数学线 |
WilliamsFractals |
WilliamsFractals(period, ...) |
Williams 分形 |
ZigZag |
ZigZag(threshold, ...) |
Z 字形 |
10. DeMark 序列 — 17 个
| 指标 | 用途 |
|---|---|
TDSetup |
TD Setup 计数 |
TDSequential |
TD Sequential |
TDCountdown |
TD Countdown |
TDCombo |
TD Combo |
TDDeMarker |
DeMarker 振荡器 |
TDREI |
Range Expansion Index |
TDPressure |
TD Pressure |
TDDwave |
TD D-Wave |
TDTrap |
TD Trap |
TDPropulsion |
TD Propulsion |
TDClopwin |
TD Clopwin |
TDClop |
TD Clop |
TDCamouflage |
TD Camouflage |
TDLines |
TD Lines |
TDRangeProjection |
TD Range Projection |
TDDifferential |
TD Differential |
TDOpen / TDRiskLevel |
TD Open / Risk Level |
11. K线形态(Candlestick Patterns)— 60+ 个
所有 K 线形态指标输入类型为 Candle,输出为 float(0/1 或形态强度值)。
| 分类 | 指标 |
|---|---|
| 单根 K 线 | Doji, DragonflyDoji, GravestoneDoji, LongLeggedDoji, RickshawMan, DojiStar, Hammer, InvertedHammer, HangingMan, ShootingStar, SpinningTop, Marubozu, ClosingMarubozu, OpeningMarubozu, HighWave, BeltHold, LongLine, ShortLine, Takuri |
| 看涨反转 | MorningDojiStar, MorningEveningStar(含看跌), AbandonedBaby, PiercingDarkCloud(含看跌), ThreeSoldiersOrCrows(含看跌), ThreeInside, ThreeOutside, Engulfing, Harami, HaramiCross, Counterattack, Kicking, KickingByLength, LadderBottom, MatchingLow |
| 看跌反转 | EveningDojiStar, AdvanceBlock, Breakaway, TwoCrows, UpsideGapTwoCrows, IdenticalThreeCrows, ConcealingBabySwallow, DumplingTop, FryPanBottom |
| 持续形态 | RisingThreeMethods, FallingThreeMethods, UpsideGapThreeMethods, DownsideGapThreeMethods, MatHold, StalledPattern, StickSandwich, GapSideBySideWhite, SeparatingLines, TasukiGap |
| 其他 | Hikkake, HikkakeModified, HomingPigeon, OnNeck, InNeck, Thrusting, ThreeLineStrike, ThreeStarsInSouth, TowerTopBottom, Tristar, Tweezer, UniqueThreeRiver, NewPriceLines |
12. 图表形态(Chart Patterns)— 8 个
| 指标 | 用途 |
|---|---|
CupAndHandle |
杯柄形态 |
RectangleRange |
矩形整理 |
FlagPennant |
旗形/三角旗 |
Wedge |
楔形 |
Triangle |
三角形 |
HeadAndShoulders |
头肩顶/底 |
TripleTopBottom |
三重顶/底 |
DoubleTopBottom |
双顶/双底 |
13. 谐波形态(Harmonic Patterns)— 8 个
| 指标 | 用途 |
|---|---|
Gartley |
Gartley 蝙蝶 |
Bat |
Bat 蝙蝶 |
Butterfly |
Butterfly 蝶蝶 |
Crab |
Crab 蝶蝶 |
Shark |
Shark 趶蝶 |
Cypher |
Cypher 趶蝶 |
ThreeDrives |
三驱形态 |
Abcd |
AB=CD 形态 |
14. 斐波那契(Fibonacci)— 10 个
| 指标 | 用途 |
|---|---|
FibRetracement |
斐波那契回撤 |
FibExtension |
斐波那契扩展 |
FibProjection |
斐波那契投射 |
FibFan |
斐波那契扇形 |
FibArcs |
斐波那契弧线 |
FibChannel |
斐波那契通道 |
FibTimeZones |
斐波那契时间区间 |
FibConfluence |
斐波那契汇合区 |
GoldenPocket |
黄金口袋(0.618-0.786 区间) |
AutoFib |
自动斐波那契 |
15. 微结构指标(Microstructure)— 15 个
订单簿
| 指标 | 用途 |
|---|---|
OrderFlowImbalance |
订单流不平衡 |
OrderBookImbalanceTop1 |
最优档订单簿不平衡 |
OrderBookImbalanceTopN |
前 N 档订单簿不平衡 |
OrderBookImbalanceFull |
全档订单簿不平衡 |
Microprice |
微价格 |
QuotedSpread |
报价价差 |
DepthSlope |
深度斜率 |
交易流
| 指标 | 用途 |
|---|---|
Pin |
PIN 指标(知情交易概率) |
TradeSignAutocorrelation |
交易符号自相关 |
RollMeasure |
Roll 价差估计 |
AmihudIlliquidity |
Amihud 非流动性 |
Vpin |
VPIN |
SignedVolume |
符号成交量 |
CumulativeVolumeDelta |
累积成交量差 |
TradeImbalance |
交易不平衡 |
价格冲击
| 指标 | 用途 |
|---|---|
HasbrouckInformationShare |
Hasbrouck 信息份额 |
EffectiveSpread |
有效价差 |
RealizedSpread |
已实现价差 |
KylesLambda |
Kyle's λ |
Footprint
| 指标 | 用途 |
|---|---|
Footprint |
足印图 |
16. 衍生品指标(Derivatives)— 16 个
| 指标 | 用途 |
|---|---|
FundingRate |
资金费率 |
FundingRateMean |
资金费率均值 |
FundingRateZScore |
资金费率 Z 分数 |
FundingBasis |
资金费率基差 |
FundingImpliedApr |
资金费率隐含年化 |
OpenInterestDelta |
持仓量变化 |
OpenInterestMomentum |
持仓量动量 |
OIPriceDivergence |
持仓量-价格背离 |
OIWeighted |
持仓量加权 |
OiToVolumeRatio |
持仓量/成交量比 |
EstimatedLeverageRatio |
估计杠杆比 |
PerpetualPremiumIndex |
永续溢价指数 |
LongShortRatio |
多空比 |
TakerBuySellRatio |
主动买卖比 |
TermStructureBasis |
期限结构基差 |
CalendarSpread |
日历价差 |
LiquidationFeatures |
爆仓特征 |
17. 市场广度(Market Breadth)— 15 个
| 指标 | 用途 |
|---|---|
AdvanceDecline |
腾落指数 |
AdvanceDeclineRatio |
腾落比 |
AdVolumeLine |
AD 成交量线 |
AbsoluteBreadthIndex |
绝对广度指数 |
CumulativeVolumeIndex |
累积成交量指数 |
BullishPercentIndex |
看多百分比指数 |
UpDownVolumeRatio |
涨跌成交量比 |
PercentAboveMa |
均线上方百分比 |
HighLowIndex |
新高新低指数 |
NewHighsNewLows |
新高新低 |
BreadthThrust |
广度推力 |
Trin |
ARMS TRIN |
McClellanOscillator |
麦克莱恩振荡器 |
McClellanSummationIndex |
麦克莱恩总和指数 |
TickIndex |
Tick 指数 |
18. 风险 / 绩效指标(Risk / Performance)— 17 个
| 指标 | 构造 | 输入类型 | 用途 |
|---|---|---|---|
SharpeRatio |
SharpeRatio(period, ...) |
f64 | Sharpe 比 |
SortinoRatio |
SortinoRatio(period, ...) |
f64 | Sortino 比 |
CalmarRatio |
CalmarRatio(period, ...) |
f64 | Calmar 比 |
OmegaRatio |
OmegaRatio(period, ...) |
f64 | Omega 比 |
TreynorRatio |
TreynorRatio(period, ...) |
f64 | Treynor 比 |
InformationRatio |
InformationRatio(period, ...) |
f64 | 信息比 |
Alpha |
Alpha(period, ...) |
f64 | Alpha |
MaxDrawdown |
MaxDrawdown(period, ...) |
f64 | 最大回撤 |
AverageDrawdown |
AverageDrawdown(period, ...) |
f64 | 平均回撤 |
DrawdownDuration |
DrawdownDuration(period, ...) |
f64 | 回撤持续期 |
PainIndex |
PainIndex(period, ...) |
f64 | 痛苦指数 |
ValueAtRisk |
ValueAtRisk(period, ...) |
f64 | VaR |
ConditionalValueAtRisk |
ConditionalValueAtRisk(period, ...) |
f64 | CVaR |
ProfitFactor |
ProfitFactor(period, ...) |
f64 | 盈利因子 |
GainLossRatio |
GainLossRatio(period, ...) |
f64 | 盈亏比 |
RecoveryFactor |
RecoveryFactor(period, ...) |
f64 | 恢复因子 |
KellyCriterion |
KellyCriterion(period, ...) |
f64 | Kelly 准则 |
19. 季节性 & 时段(Seasonality & Session)— 11 个
| 指标 | 用途 |
|---|---|
SessionVwap |
时段 VWAP |
SessionHighLow |
时段高低 |
SessionRange |
时段范围 |
AverageDailyRange |
平均日范围 |
OvernightGap |
隔夜缺口 |
OvernightIntradayReturn |
隔夜/日内收益 |
TurnOfMonth |
月末效应 |
SeasonalZScore |
季节性 Z 分数 |
TimeOfDayReturnProfile |
时点收益轮廓 |
DayOfWeekProfile |
星期轮廓 |
IntradayVolatilityProfile |
日内波动率轮廓 |
VolumeByTimeProfile |
时段成交量轮廓 |
20. Ichimoku & 替代图表 — 7 个
| 指标 | 用途 |
|---|---|
Ichimoku |
一目均衡表 |
HeikinAshi |
平均 K 线 |
SmoothedHeikinAshi |
平滑平均 K 线 |
HeikinAshiOscillator |
平均 K 线振荡器 |
ThreeLineBreak |
三线反转 |
Equivolume |
等量图 |
CandleVolume |
K 线成交量 |
21. 市场轮廓(Market Profile)— 10 个
| 指标 | 用途 |
|---|---|
CompositeProfile |
复合轮廓 |
VolumeProfile |
成交量轮廓 |
TpoProfile |
TPO 轮廓 |
HighLowVolumeNodes |
高低成交量节点 |
ProfileShape |
轮廓形状 |
SinglePrints |
单次打印 |
NakedPoc |
裸 POC |
ValueArea |
价值区域 |
InitialBalance |
初始平衡 |
OpeningRange |
开盘范围 |
22. 替代 K 线(Alt-Chart Bars)— 10 个
| 指标 | 用途 |
|---|---|
DollarBars |
美元柱 |
VolumeBars |
成交量柱 |
TickBars |
Tick 柱 |
RangeBars |
范围柱 |
RenkoBars |
Renko 砖 |
KagiBars |
钓鱼线 |
PointAndFigureBars |
点数图 |
ThreeLineBreakBars |
三线反转柱 |
RunBars |
Run 柱 |
ImbalanceBars |
不平衡柱 |
23. 杂项 / 特殊指标 — 40+ 个
| 指标 | 用途 |
|---|---|
M2Measure |
M2 度量 |
UpsidePotentialRatio |
上行潜力比 |
GainToPainRatio |
盈亏痛苦比 |
CommonSenseRatio |
常识比 |
KRatio |
K 比 |
TailRatio |
尾比 |
MartinRatio |
Martin 比 |
BurkeRatio |
Burke 比 |
SterlingRatio |
Sterling 比 |
AUTOCORRPGRAM |
自相关周期图 |
EVENBETTERSINE |
Even Better Sine |
BANDPASS |
带通滤波器 |
ADAPTIVECCI |
自适应 CCI |
ADAPTIVERSI |
自适应 RSI |
UNIVERSALOSC |
通用振荡器 |
CTI |
CTI 指标 |
TRENDFLEX |
TrendFlex |
REFLEX |
Reflex 指标 |
HIGHPASS |
高通滤波器 |
SAMPLEENT |
样本熵 |
SHANNONENT |
Shannon 熵 |
ROLLINGMINMAX |
滚动最小最大 |
JARQUEBERA |
Jarque-Bera 检验 |
TimeBasedStop |
时间止损 |
ProjectionOscillator |
投影振荡器 |
HoltWinters |
Holt-Winters 预测 |
GD |
Generalized DEMA |
AdaptiveLaguerre |
自适应 Laguerre |
MedianMA |
中位数移动平均 |
EHMA |
Ehlers 移动平均 |
GMA |
几何移动平均 |
SWMA |
Sine 加权移动平均 |
Expectancy |
期望值 |
WinRate |
胜率 |
RegimeLabel |
市场体制标签 |
JumpIndicator |
跳跃指示器 |
TrendLabel |
趋势标签 |
HighLowRange |
高低范围 |
WickRatio |
烛芯比 |
BodySizePct |
实体大小百分比 |
CloseVsOpen |
收盘vs开盘 |
RealizedVolatility |
已实现波动率 |
LogReturn |
对数收益率 |
TSF |
时间序列预测 |
LINEARREG_INTERCEPT |
线性回归截距 |
ROCR100 / ROCR / ROCP |
变化率(各种变体) |
AVGPRICE |
平均价格 |
MIDPOINT / MIDPRICE |
中点/中价 |
DX |
方向指数 |
MINUS_DI / PLUS_DI |
负/正方向指数 |
WAVE_PM |
Wave PM |
POLARIZED_FRACTAL_EFFICIENCY |
极化分形效率 |
TREND_STRENGTH_INDEX |
趋势强度指数 |
TTM_TREND |
TTM 趋势 |
IMI |
Intraday Momentum Index |
Pgo |
Pretty Good Oscillator |
Qstick |
QStick |
GatorOscillator |
鳄鱼振荡器 |
KasePermissionStochastic |
Kase 许可随机 |
TsfOscillator |
TSF 振荡器 |
PpoHistogram / MacdHistogram |
PPO/MACD 柱状图 |
24. 数据层工具(Data Layer)— 5 个
| 工具 | 用途 |
|---|---|
CandleReader |
读取 OHLCV CSV(验证头部,容忍 BOM) |
Resampler |
K 线重采样(1m → 5m/15m/1h/1d 等) |
TickAggregator |
Tick → K 线聚合 |
BinanceFeed |
Binance 实时 WebSocket 数据 |
fetch_binance_klines |
获取 Binance 历史 K 线 |
QuantDinger 快速映射表
写 QuantDinger 指标时,用这张表找 Wickra 等价物:
| QuantDinger (pandas) | Wickra (Python) | 备注 |
|---|---|---|
df["close"].ewm(span=N, adjust=False).mean() |
ta.EMA(N).batch(close) |
batch 返回 array,np.asarray 零拷贝 |
df["close"].rolling(N).mean() |
ta.SMA(N).batch(close) |
|
df["close"].rolling(N).std() |
ta.StdDev(N).batch(close) |
|
df["close"].pct_change(N) |
ta.ROC(N).batch(close) |
ROC 是百分比变化率 |
df["close"].rolling(N).apply(np.median) |
ta.RollingQuantile(N, 0.5).batch(close) |
|
talib.RSI(df["close"], timeperiod=14) |
ta.RSI(14).batch(close) |
|
talib.MACD(df["close"], 12, 26, 9) |
ta.MACD(12, 26, 9).batch(close) |
返回 (n,3) Matrix |
talib.BBANDS(df["close"], 20, 2, 2) |
ta.BollingerBands(20, 2.0).batch(close) |
返回 (n,4) Matrix |
talib.ATR(df["high"], df["low"], df["close"], 14) |
ta.ATR(14).batch(high, low, close) |
|
talib.ADX(df["high"], df["low"], df["close"], 14) |
ta.ADX(14).batch(high, low, close) |
返回 (n,3) |
talib.STOCH(...) |
ta.Stochastic(14, 3).batch(high, low, close) |
返回 (n,2) |
talib.CCI(...) |
ta.CCI(20).batch(high, low, close) |
|
talib.OBV(df["close"], df["volume"]) |
ta.OBV().batch(close, volume) |
|
talib.SAR(...) |
ta.PSAR(0.02, 0.02, 0.2).batch(high, low, close) |
查找指标 Rust 源码
每个指标的 Rust 实现在 crates/wickra-core/src/indicators/ 下,文件名 = 指标名的 snake_case:
ta.RSI → crates/wickra-core/src/indicators/rsi.rs
ta.MACD → crates/wickra-core/src/indicators/macd.rs
ta.BollingerBands → crates/wickra-core/src/indicators/bollinger.rs
ta.SuperTrend → crates/wickra-core/src/indicators/super_trend.rs
Python 绑定在 bindings/python/src/lib.rs,类型签名在 bindings/python/python/wickra/__init__.pyi。