ai-trader-station

ai-trader-station

MCP server exposing Bill Williams trading signal analysis, market data, and order execution capabilities from MetaTrader 5, enabling AI assistants to run analyses and execute trades through natural language.

Category
访问服务器

README

ai-trader-station

AI-powered trading workstation built on PySide6 and MetaTrader 5.

Bill Williams signal cascade, MCP protocol surface, AI price forecasting on RunPod serverless GPU. Built for real trading — runs anywhere Python and MetaTrader 5 are installed.


ChaosPanel — Fib-Based Order Execution

ChaosPanel

One-click order execution. Auto-detects BUY/SELL from fib direction, risk%-based lot sizing, BUY STOP / SELL STOP / market orders with pre-send price validation. Fibonacci levels drawn on chart, risk/reward calculated live.


BW Screener — Multi-Symbol Signal Scan

BW Screener

Scan any number of symbols across all timeframes (M1 to MN1) for Bill Williams setups. Color-coded AO signals (Cross, Saucer, Twin Peaks), MFI analysis (Green, Fade, Fake, Squat), fractal markers — all updating in real time with auto-refresh.


AO Chart — Interactive Analysis

AO Chart

Drill into any symbol. Alligator overlay (Jaw/Teeth/Lips), Awesome Oscillator histogram, fractal arrows, signal annotations. BW status bar shows current AO state, MFI reading, and Alligator alignment at a glance.


AI Chat — Natural Language Trading

Chat Window

DeepSeek + Qwen3-VL powered chat with MCP tool use. Ask questions about market data, run analysis, execute trades — all through natural language. Full MCP protocol surface with schema-validated tool calls.


Trade Management — Live Positions & Orders

Active Trades

Monitor open positions and pending orders in real time. BUY STOP orders placed by the bot show source, SL/TP levels, and one-click cancel. P&L tracking across all positions.


Features

  • Bill Williams Signal Cascade — Alligator, AO, Fractals, Gator, Zone Trading, Twin Peaks divergence. Multi-timeframe confirmation: fractal trigger → AO confirm → higher-TF filter.
  • ChaosPanel — Order execution with auto BUY/SELL detection, risk%-based lot sizing, BUY/SELL STOP + market orders, filling-mode handling.
  • AO Screener — Scan multiple symbols for BW setups across all timeframes.
  • Kronos AI Forecaster — 102M parameter price prediction model on RunPod serverless. Lot-sizing advisor: agrees with signal → x1.5, disagrees → x0.5, neutral → x1.0.
  • MCP Protocol Surface — Model Context Protocol tool interface for agentic AI access to all trading capabilities. Thread-safe Qt bridge.
  • AI Chat — DeepSeek/Qwen3-VL with MCP tool use for natural language trading.
  • Plugin System — Modular plugin registry with ordered loading and dependency flags.

Architecture

┌──────────────────────────────────────┐
│  ai-trader-station                   │
│                                      │
│  ┌────────────────┐  ┌───────────┐  │
│  │ Signal Engine   │  │ MetaTrader│  │
│  │ BW Cascade      │──│ 5 (broker)│  │
│  ├────────────────┤  └───────────┘  │
│  │ ChaosPanel      │                │
│  │ Order Execution  │                │
│  ├────────────────┤                 │
│  │ MCP Surface     │                │
│  │ AI Tool Use     │                │
│  ├────────────────┤                 │
│  │ Chat Window     │                │
│  │ DeepSeek/Qwen   │                │
│  └────────┬───────┘                 │
└───────────┼──────────────────────────┘
            │ HTTPS (optional)
  ┌─────────▼─────────┐
  │  RunPod Serverless  │
  │  Kronos 102M       │
  │  Price Forecast    │
  └────────────────────┘

Tech Stack

Layer Technology
UI PySide6/Qt6, pyqtgraph
Broker MetaTrader 5 (Python API)
AI Chat DeepSeek API (OpenAI-compatible)
AI Vision Qwen3-VL via RunPod
AI Forecast Kronos 102M on RunPod Serverless
MCP Custom implementation with schema validation
Language Python 3.11+

Installation

Prerequisites

  • Python 3.11+
  • MetaTrader 5 installed and logged into a broker
  • A RunPod account (for Kronos AI forecasts — optional)
  • A DeepSeek API key (for AI chat — optional)

Setup

git clone https://github.com/Swigler/ai-trader-station.git
cd ai-trader-station

# Install with all dependencies
pip install -e ".[qt,mt5]"

# Copy env template and add your keys
cp .env.example .env

Environment Variables

# Required for AI chat
DEEPSEEK_API_KEY=your-deepseek-key

# Required for Kronos AI forecasts (optional)
RUNPOD_ENDPOINT=https://api.runpod.ai/v2/{endpoint-id}/run
RUNPOD_API_KEY=your-runpod-key

# Optional — Kronos local server
KRONOS_URL=http://localhost:7600

Run

python -m trade_app

Kronos AI Setup (RunPod Serverless)

Kronos is a 102.3M parameter price prediction model running on RunPod serverless GPU. Scales to zero when idle, spins up on demand.

Docker Image

radu372/kronos-serverless:v2

Step 1 — Create a Network Volume

  1. Go to RunPod Console → Storage → Network Volumes
  2. Create a new volume: 10 GB, pick a datacenter close to you
  3. Note the volume ID

Step 2 — Download Model Weights

Spin up a temporary GPU pod with the network volume attached, then:

from huggingface_hub import snapshot_download

snapshot_download('NeoQuasar/Kronos-base',           local_dir='/workspace/kronos/model')
snapshot_download('NeoQuasar/Kronos-Tokenizer-base', local_dir='/workspace/kronos/tokenizer')

Terminate the pod after download — the weights persist on the volume.

Step 3 — Create Serverless Endpoint

  1. Go to Serverless → New Endpoint
  2. Container Image: radu372/kronos-serverless:v2
  3. GPU: Any Ampere GPU (RTX 3060+ / A4000+ / A100)
  4. Workers: Min 0, Max 1 (scale to zero)
  5. Idle Timeout: 5 seconds
  6. Advanced → Network Volume: attach the volume from Step 1
  7. Environment Variables:
Variable Value
KRONOS_MODEL_PATH /workspace/kronos/model
KRONOS_TOKENIZER_PATH /workspace/kronos/tokenizer

Step 4 — Test

curl -X POST "https://api.runpod.ai/v2/{endpoint-id}/runsync" \
  -H "Authorization: Bearer ${RUNPOD_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"input": {"action": "health"}}'

Expected response:

{"output": {"status": "ok", "device": "cuda:0", "model_path": "/workspace/kronos/model"}}

Step 5 — Connect to the App

Add your endpoint URL and API key to .env or enter them in the launcher UI.

Kronos API

Single prediction:

POST /predict
{
  "bars": [{"timestamp": "...", "open": 1.1, "high": 1.2, "low": 1.0, "close": 1.15, "volume": 100, "amount": 0}],
  "pred_len": 10,
  "sample_count": 1
}

Response:

{
  "direction": "long",
  "confidence": 0.73,
  "predictions": [{"timestamp": "...", "open": ..., "high": ..., "low": ..., "close": ..., "volume": ..., "amount": ...}]
}

Kronos is a lot-sizing advisor, never a gatekeeper. Signal agrees → x1.5 lot. Disagrees → x0.5. Neutral → x1.0. The BW cascade always has final authority.

Signal Cascade

The signal engine implements Bill Williams' Trading Chaos methodology as a cascading gate system:

Fractal Trigger
  → Alligator Trend Filter (SMMA 13/8/5)
    → AO Momentum Confirmation
      → Higher Timeframe Filter
        → Zone Trading (AO + AC color)
          → Execution via ChaosPanel

Each dimension must confirm before the next activates. No signal passes without clearing every gate.

Phase Component Status
2 Twin Peaks (AO divergence) Done
3 Fractal-Alligator Filter Done
4 Zone Trading (AO-only) Done
6 Exit signals Done
6b Relaxed cascade mode Done
7 Kronos AI lot-sizing Done

Project Structure

ai-trader-station/
├── pyproject.toml
├── .env.example
├── src/
│   └── trade_app/
│       ├── __main__.py              # Entry point
│       ├── app.py                   # Launcher + plugin loading
│       ├── constants.py
│       ├── core/
│       │   ├── signal_engine.py     # Bill Williams indicator engine
│       │   ├── executor.py          # MT5 order execution + risk sizing
│       │   └── kronos_client.py     # Kronos forecast client
│       ├── ui/
│       │   ├── trading_hub.py       # Main window + tab management
│       │   ├── ao_chart.py          # AO chart widget
│       │   ├── ao_screener.py       # Multi-symbol BW screener
│       │   ├── chat_window.py       # AI chat with MCP tool use
│       │   └── control_board.py     # ChaosPanel order execution
│       ├── integrations/
│       │   ├── mt5_utils.py         # MetaTrader 5 helpers
│       │   ├── mcp_app.py           # MCP entry point
│       │   └── mcp/
│       │       ├── bridge.py        # Thread-safe Qt bridge
│       │       ├── schema.py        # MCP tool schemas
│       │       └── interface.py     # MCP interface
│       └── plugins/
│           └── registry.py          # Plugin discovery + loading
├── tests/
│   ├── test_signal_engine.py
│   └── test_indicators.py
└── docs/                            # Screenshots

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选