# AlphaBook Trend MCP (`neeenja/alphabook-trend`) Actor

Trend & momentum signal engine as a remote MCP server. Five tools: detect_trend_state, get_trend_strength, find_ma_pullback, rank_momentum, check_mtf_alignment. Returns verdicts with evidence, invalidation levels and confidence, not raw indicator numbers. A-shares, HK, US, no API key.

- **URL**: https://apify.com/neeenja/alphabook-trend.md
- **Developed by:** [Neeen Ja](https://apify.com/neeenja) (community)
- **Categories:** MCP servers, AI
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 trend analysis calls

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## AlphaBook Trend MCP（AB-01）

> **AB-01** = **Alpha**Book 系列的第一个 server —— **趋势跟随 / 动量**信号引擎。
> AlphaBook 是一组「把交易策略做成 MCP」的服务族，AB-01 负责其中一个家族：趋势与动量。

🌐 **[English](#english)** · **[简体中文](#简体中文)** · **[繁體中文](#繁體中文)**

| 它住在哪 | 地址 |
|---|---|
| MCP 端点 | `https://neeenja--alphabook-trend.apify.actor/mcp` |
| Apify Store | https://apify.com/neeenja/alphabook-trend |
| 源码 | Proprietary —— **Source available on request**（仓库私有，本服务以托管方式提供） |

***

<a id="english"></a>

## English

### What you get

Most "stock MCP servers" hand you raw data — OHLCV arrays, indicator values — and leave the interpretation to the model. **This one returns verdicts.**

Five tools, each answering a decision question rather than dumping numbers:

| Tool | Question it answers |
|---|---|
| `detect_trend_state` | Is this stock in an uptrend, downtrend, or choppy range — and what price would invalidate that call? |
| `get_trend_strength` | How strong is the trend (0–100), from ADX/+DI/−DI, MACD histogram, distance from the 52-week high and ATR? |
| `find_ma_pullback` | Is it pulling back to a key moving average right now — one of the highest win-rate entry patterns? |
| `rank_momentum` | Rank a basket (up to 10 symbols) by cross-sectional momentum. Which names are actually strongest? |
| `check_mtf_alignment` | Do weekly, daily and 60-minute trends point the same way? Triple confirmation cuts false breakouts. |

Every response carries **evidence, an invalidation level and a confidence tag**. When the environment does not support the signal — most notably `ADX < 20`, i.e. a choppy market — the tool says so instead of manufacturing an entry.

#### Coverage and data

- **Markets**: China A-shares (`600519`), Hong Kong (`00700`), US (`AAPL`), plus Taiwan / Japan / Korea / UK / France / Germany and others via the global upstream.
- **Source**: free public endpoints (Tencent `qt.gtimg.cn` / `web.ifzq.gtimg.cn`, Yahoo Finance). **No API key, no paid upstream.**
- 60-minute bars are available for Tencent-covered markets. For markets without an intraday feed, `check_mtf_alignment` **degrades to two layers and says so explicitly** — it never invents a third layer.

### Connect

Remote MCP (recommended) — Streamable HTTP, stateless:

```json
{
  "mcpServers": {
    "alphabook-trend": {
      "url": "https://neeenja--alphabook-trend.apify.actor/mcp",
      "headers": { "Authorization": "Bearer <YOUR_APIFY_TOKEN>" }
    }
  }
}
```

The endpoint requires an Apify token (pay-per-event Actors always do). `initialize` and `tools/list` are free; only `tools/call` is charged.

### Pricing

| Event | Price | Tools |
|---|---|---|
| `tool-call` | **$0.02** | `detect_trend_state`, `get_trend_strength`, `find_ma_pullback`, `check_mtf_alignment` |
| `screen-call` | **$0.05** | `rank_momentum` (up to 10 symbols — several times the upstream cost of a single-symbol call) |

### Honest boundaries

- Signals are **rule-based readings of historical prices**, not predictions and not backtested performance claims. No tool in this server reports a win rate.
- Trend-following loses money in choppy markets. When ADX is below 20 the state is reported as `RANGE` regardless of what the moving averages say.
- Missing data is returned as `n/a`, never as `0`. A fabricated 0% is worse than an honest gap.
- This is not investment advice.

### License

Proprietary © PanStories. Offered as a hosted service (pay-per-event on Apify) — you consume the analysis, not the code. Source available on request for security and compliance review.

***

<a id="简体中文"></a>

## 简体中文

### 你拿到的是什么

大多数「股票 MCP」给你的是**原始数据** —— K 线数组、指标数值 —— 然后把解释工作丢给模型自己做。**本服务返回的是判定。**

五个工具，每个回答一个决策问题，而不是倒一堆数字：

| 工具 | 回答的问题 |
|---|---|
| `detect_trend_state` | 这只票现在是上升趋势、下降趋势还是震荡？跌破什么价位这个判定就失效？ |
| `get_trend_strength` | 趋势有多强（0–100），由 ADX/+DI/−DI、MACD 柱、距 52 周高点的距离和 ATR 合成 |
| `find_ma_pullback` | 现在是不是正在回踩关键均线 —— 胜率最高的入场形态之一？ |
| `rank_momentum` | 一篮子标的（最多 10 个）按横截面动量排名，谁才是真正最强的？ |
| `check_mtf_alignment` | 周线、日线、60 分钟是否同向？三重共振能显著减少假突破 |

每次返回都带**证据、失效位和置信度标签**。当环境本身不支持这个信号时 —— 最典型的是 `ADX < 20`（震荡市）—— 工具会直接说「不适用」，而不是硬编一个买点出来。

#### 覆盖范围与数据源

- **市场**：A 股（`600519`）、港股（`00700`）、美股（`AAPL`），以及台湾 / 日本 / 韩国 / 英国 / 法国 / 德国等全球标的。
- **数据源**：免费公开接口（腾讯 `qt.gtimg.cn` / `web.ifzq.gtimg.cn`、Yahoo Finance）。**无需 API key，无付费上游。**
- 60 分钟线在腾讯覆盖的市场可用。无分钟线数据源的市场，`check_mtf_alignment` 会**明确降级为周/日两层并说明**，绝不用想象值补齐第三层。

### 连接方式

远程 MCP（推荐）—— Streamable HTTP，无状态：

```json
{
  "mcpServers": {
    "alphabook-trend": {
      "url": "https://neeenja--alphabook-trend.apify.actor/mcp",
      "headers": { "Authorization": "Bearer <你的_APIFY_TOKEN>" }
    }
  }
}
```

端点需要 Apify token（按次计费的 Actor 一律需要）。`initialize` 与 `tools/list` 免费，只有 `tools/call` 计费。

### 定价

| 事件 | 价格 | 工具 |
|---|---|---|
| `tool-call` | **$0.02** | `detect_trend_state`、`get_trend_strength`、`find_ma_pullback`、`check_mtf_alignment` |
| `screen-call` | **$0.05** | `rank_momentum`（最多 10 个标的，上游成本是单标的的数倍） |

### 诚实边界

- 信号是**基于历史价格的规则化判读**，不是预测，也不含回测业绩声明。本服务没有任何工具宣称胜率。
- 趋势跟随在震荡市里就是会亏钱。当 ADX 低于 20 时，无论均线怎么排列，状态一律报 `RANGE`。
- 取不到的数据返回 `n/a`，**绝不返回 0**。编出来的 0% 比诚实的缺失更有害。
- 本服务不构成投资建议。

### 许可

Proprietary © PanStories。以托管服务提供（Apify 按次计费）—— 你消费的是分析结果，不是代码。源码可按要求提供，用于安全与合规审查。

***

<a id="繁體中文"></a>

## 繁體中文

### 你拿到的是什麼

大多數「股票 MCP」給你的是**原始資料** —— K 線陣列、指標數值 —— 然後把解讀工作丟給模型自己處理。**本服務回傳的是判定。**

五個工具，每一個都回答一個決策問題，而不是倒一堆數字：

| 工具 | 回答的問題 |
|---|---|
| `detect_trend_state` | 這檔標的現在是上升趨勢、下降趨勢還是震盪？跌破什麼價位這個判定就失效？ |
| `get_trend_strength` | 趨勢有多強（0–100），由 ADX/+DI/−DI、MACD 柱、距 52 週高點的距離與 ATR 合成 |
| `find_ma_pullback` | 現在是不是正在回踩關鍵均線 —— 勝率最高的進場型態之一？ |
| `rank_momentum` | 一籃子標的（最多 10 檔）按橫截面動量排名，誰才是真正最強的？ |
| `check_mtf_alignment` | 週線、日線、60 分鐘是否同向？三重共振能顯著減少假突破 |

每次回傳都帶**證據、失效位與信心標籤**。當環境本身不支援這個訊號時 —— 最典型的是 `ADX < 20`（震盪市）—— 工具會直接說明「不適用」，而不是硬編一個買點出來。

#### 覆蓋範圍與資料來源

- **市場**：A 股（`600519`）、港股（`00700`）、美股（`AAPL`），以及台灣 / 日本 / 韓國 / 英國 / 法國 / 德國等全球標的。
- **資料來源**：免費公開介面（騰訊 `qt.gtimg.cn` / `web.ifzq.gtimg.cn`、Yahoo Finance）。**無需 API key，無付費上游。**
- 60 分鐘線在騰訊覆蓋的市場可用。沒有分鐘線資料來源的市場，`check_mtf_alignment` 會**明確降級為週/日兩層並說明**，絕不用想像值補齊第三層。

### 連線方式

遠端 MCP（建議）—— Streamable HTTP，無狀態：

```json
{
  "mcpServers": {
    "alphabook-trend": {
      "url": "https://neeenja--alphabook-trend.apify.actor/mcp",
      "headers": { "Authorization": "Bearer <你的_APIFY_TOKEN>" }
    }
  }
}
```

端點需要 Apify token（按次計費的 Actor 一律需要）。`initialize` 與 `tools/list` 免費，只有 `tools/call` 計費。

### 定價

| 事件 | 價格 | 工具 |
|---|---|---|
| `tool-call` | **$0.02** | `detect_trend_state`、`get_trend_strength`、`find_ma_pullback`、`check_mtf_alignment` |
| `screen-call` | **$0.05** | `rank_momentum`（最多 10 檔標的，上游成本是單標的的數倍） |

### 誠實邊界

- 訊號是**基於歷史價格的規則化判讀**，不是預測，也不含回測績效聲明。本服務沒有任何工具宣稱勝率。
- 趨勢跟隨在震盪市裡就是會虧錢。當 ADX 低於 20 時，無論均線怎麼排列，狀態一律回報 `RANGE`。
- 取不到的資料回傳 `n/a`，**絕不回傳 0**。編出來的 0% 比誠實的缺失更有害。
- 本服務不構成投資建議。

### 授權

Proprietary © PanStories。以託管服務提供（Apify 按次計費）—— 你消費的是分析結果，不是程式碼。原始碼可依要求提供，用於安全與合規審查。

# Actor input Schema

## Actor input object example

```json
{}
```

# Actor output Schema

## `mcpEndpoint` (type: `string`):

Streamable HTTP MCP endpoint of this Actor run. Connect an MCP client here (Authorization: Bearer \<APIFY_TOKEN>). POST JSON-RPC messages: initialize, tools/list, tools/call.

## `tools` (type: `string`):

Comma-separated list of the five tools: detect_trend_state, get_trend_strength, find_ma_pullback, rank_momentum, check_mtf_alignment.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("neeenja/alphabook-trend").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("neeenja/alphabook-trend").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call neeenja/alphabook-trend --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neeenja/alphabook-trend"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ITIAQCt9NgfUzAuFT/builds/eaRFosr3IUq4Xza4u/openapi.json
