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
Visit Server

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured