Back to MCP directory
publicPublicdnsLocal runtime

crypto-indicators-mcp

一个提供加密货币技术分析指标和交易策略的MCP服务器,支持AI交易代理进行市场趋势分析和量化策略开发。

article

README

🚀 加密货币指标与策略指南

本项目提供了一系列加密货币指标计算和策略分析的工具,能帮助用户基于加密货币的交易数据进行各类指标计算和策略评估,为加密货币投资分析提供有力支持。

🚀 快速开始

要开始使用此库,请执行以下命令安装:

pip install crypto-indicators-strategies

✨ 主要特性

指标计算

  • 涵盖趋势、动量、波动性和体积等多种类型的指标计算,如 MACD、RSI 等。
  • 支持不同时间框架和参数设置,满足多样化的分析需求。

策略分析

  • 提供多种策略的计算方法,包括趋势、动量和波动性策略。
  • 以直观的数据形式输出策略信号,方便用户决策。

📦 安装指南

要开始使用此库,请执行以下命令安装:

pip install crypto-indicators-strategies

💻 使用示例

基础用法

示例 1:计算 MACD 指标

输入(自然语言提示)

请为 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)

示例 2:计算 RSI 策略

输入(自然语言提示)

请为 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

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client