本项目提供了一系列加密货币指标计算和策略分析的工具,能帮助用户基于加密货币的交易数据进行各类指标计算和策略评估,为加密货币投资分析提供有力支持。
要开始使用此库,请执行以下命令安装:
pip install crypto-indicators-strategies
要开始使用此库,请执行以下命令安装:
pip install crypto-indicators-strategies
输入(自然语言提示):
请为 BTC/USDT 计算 1 小时时间框架的 MACD,快速周期设为 12,慢速周期设为 26,信号周期设为 9,并获取 100 个数据点。
输出:
{"macd": [...], "signal": [...], "histogram": [...]}
from crypto_indicators_strategies import calculate_macd
# 输入数据(假设)
data = {
'close': [100, 105, 98, 112, 107],
'open': [95, 100, 96, 108, 103],
'high': [102, 106, 100, 114, 108],
'low': [93, 97, 95, 106, 102]
}
# 计算 MACD
result = calculate_macd(data)
# 输出结果
print(result)
输入(自然语言提示):
请为 ETH/USDT 计算 4 小时时间框架的 RSI 策略信号,周期设为 14,并获取 50 个数据点。
输出:
[-1, 0, 1, 0, ...]
from crypto_indicators_strategies import calculate_rsi_strategy
# 输入数据(假设)
data = {
'close': [100, 105, 98, 112, 107],
'open': [95, 100, 96, 108, 103],
'high': [102, 106, 100, 114, 108],
'low': [93, 97, 95, 106, 102]
}
# 计算 RSI 策略
result = calculate_rsi_strategy(data)
# 输出结果
print(result)
| 函数名 | 指标名称 |
|---|---|
calculate_absolute_price_oscillator |
绝对价格振荡器(APO) |
calculate_aroon |
艾奥诺指标(Aroon) |
calculate_balance_of_power |
平衡功率指标(BOP) |
calculate_chande_forecast_oscillator |
香南德预测振荡器(CFO) |
calculate_macd |
移动平均收敛散度(MACD) |
calculate_parabolic_sar |
抛物线形态指标(PSAR) |
calculate_kdj |
随机指标(KDJ) |
calculate_typical_price |
典型价格指标 |
calculate_volume_weighted_moving_average |
成交量加权移动平均(VWMA) |
| 函数名 | 指标名称 |
|---|---|
calculate_rsi |
相对强弱指数(RSI) |
calculate_momentum |
动量指标 |
calculate_awesome_oscillator |
Awesome Oscillator(AO) |
calculate_ichimoku_cloud |
Ichimoku 云指标 |
calculate_stochastic_oscillator |
随机振荡器(STOCH) |
calculate_williams_r |
威廉姆斯百分比振荡器(Williams %R) |
| 函数名 | 指标名称 |
|---|---|
calculate_true_range |
真实范围(TR) |
calculate_average_true_range |
平均真实范围(ATR) |
calculate_bollinger_bands |
布林带(BB) |
calculate_keltner_channels |
克特勒通道(KC) |
calculate_moving_standard_deviation |
移动标准差 |
calculate_projection_oscillator |
投影振荡器(PO) |
calculate_ulcer_index |
溃疡指数(UI) |
| 函数名 | 指标名称 |
|---|---|
calculate_on_balance_volume |
平衡成交量(OBV) |
calculate_accumulation_distribution |
累积分布指标 |
calculate_money_flow_index |
资金流量指数(MFI) |
calculate_volume_price_trend |
价格与成交量趋势(PVT) |
calculate_force_index |
力量指数 |
| 函数名 | 策略名称 |
|---|---|
calculate_macd_strategy |
MACD 策略 |
calculate_kdj_strategy |
KDJ 策略 |
calculate_parabolic_sar_strategy |
PSAR 策略 |
calculate_bollinger_band_strategy |
布林带策略 |
| 函数名 | 策略名称 |
|---|---|
calculate_rsi_strategy |
RSI 策略 |
calculate_stochastic_strategy |
STOCH 策略 |
calculate_momentum_strategy |
动量策略 |
| 函数名 | 策略名称 |
|---|---|
calculate_bollinger_bands_strategy |
布林带波动性策略 |
calculate_keltner_channels_strategy |
克特勒通道波动性策略 |
本项目使用 MIT 许可证。请参阅 LICENSE 文件以获取详细信息。
如需了解更多信息或贡献代码,请访问我们的 GitHub 仓库:https://github.com/your-username/crypto-indicators-strategies