Skip to content

Back to the catalog

ralphtradesz/trading-hub
github.comrepo

ralphtradesz/trading-hub

Trading Hub is a free macOS desktop trading platform built with C#/.NET 10 and Avalonia. It uses the user's Claude Code subscription: a chat writes and fixes C# strategies, an in-app MCP server lets Claude run backtests, optimizations and walk-forwards and write reports, and a risk agent proposes position sizes. Install and a Windows port are both driven by Claude Code prompts. License is MIT with Commons Clause.

TL;DR Open-source macOS trading app where Claude Code writes strategies, runs backtests through an built-in MCP server and sizes risk.
Document

What it claims

Trading Hub is a desktop trading platform for Apple Silicon Macs (macOS 12 or newer). Everything runs locally: there are no project servers, no accounts and no telemetry. Broker keys are stored in the macOS Keychain, never in files. It covers four market groups:

  • CME futures: Rithmic, Tradovate, and Databento history.
  • Crypto: Binance and Bybit, with free data that needs no keys.
  • Forex and CFDs: OANDA, cTrader or CSV.
  • US equities: Alpaca.

Charting includes time, tick, volume and range bars, plus a configurable footprint (bid/ask, delta, POC, per-bar profile). It also has a DOM, a tape and replay of any saved day. The UI is in Rioplatense Spanish.

How it works

Every instrument the user views is recorded tick by tick, with the aggressor side. Backtests run on those stored trades and model commissions, slippage and realistic limit-order fills. For CME data, a backtest can use Rithmic alone, Databento alone, or both, in which case Rithmic is used first and Databento fills gaps. Databento is pay-per-use, and the app shows the cost before downloading. CSV import supports Dukascopy, HistData, MetaTrader and TradingView.

Strategies are written in C# and compiled with Roslyn in an embedded editor. The API includes calls such as EnterLong() and StopLossTicks.

Optimization and validation tools:

  • Bayesian optimization (TPE), with timeframe (M1 to D1) treated as a parameter.
  • Walk-forward that picks stable plateaus rather than peaks.
  • Overfitting measures: PBO via CSCV, CPCV with embargo, and deflated Sharpe.
  • Monte Carlo runs and results broken out by market regime (range, mixed or trend; low, normal or high volatility).

Live strategies run with per-strategy limits on size, daily loss and maximum drawdown. The Claude risk agent proposes sizes, and on real accounts the user approves them. Order buttons have no blocking confirmations by design: safety comes from risk limits. A per-order confirmation for real accounts is optional and can be turned off in Settings.

How to use it

Manual install:

curl -sSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh
bash /tmp/dotnet-install.sh --channel 10.0
git clone https://github.com/ralphtradesz/trading-hub.git
cd trading-hub
./build-app.sh --install

The app installs to /Applications/Trading Hub.app and starts on a simulated account. Real trading stays off until it is enabled under Connections.

About 250 ATAS indicators can be added from ATAS's public repository. A script adapts their namespaces without changing their logic:

git clone https://github.com/AtasPlatform/Indicators.git third_party/ATAS-Indicators
python3 tools/port_atas.py
./build-app.sh --install

Single C# indicators can also be dropped into ~/Documents/Trading Hub/Indicadores, where they are compiled automatically.

The Windows port is not built yet. PORTAR_A_WINDOWS.md lists the macOS-specific parts. The provided prompt has Claude Code do the port in six stages:

  1. Make the app build and start on Windows.
  2. Move key storage to Windows Credential Manager or DPAPI.
  3. Port the integrations: SetThreadExecutionState, tray icon, shell open, sounds, and locating Claude Code.
  4. Adapt the UI: title bar and Ctrl shortcuts.
  5. Add a build-windows.ps1 that publishes self-contained builds for win-x64 and win-arm64.
  6. Run the final verification.

Each stage ends with dotnet build TradingHub.slnx and dotnet test tests/TradingHub.Tests. Tests are isolated from real user data through the variables TRADINGHUB_DATA_DIR, TRADINGHUB_STRATEGIES_DIR, TRADINGHUB_INDICATORS_DIR and TRADINGHUB_KEYCHAIN_FILE.

Limits

The only supported build target is Apple Silicon macOS. Some features, such as running with the lid closed, may not port to Windows, and the port prompt says to hide such options there.

The licence is MIT with Commons Clause. Users may run, modify and share the code, including to trade their own money. They may not sell the app, a modified version, or a paid service whose value comes from it, such as paid installation, hosting or support. The README itself states this is not OSI open source.

ATAS and other third-party indicators are not redistributed. Their own licences apply, and the README tells users to respect them.

The README also states that backtest results do not guarantee future results and that the software comes with no warranty.

Organisations named here

  • Anthropic
  • ATAS
  • Databento
  • Rithmic
  • Tradovate
  • Binance
  • Bybit
  • OANDA
  • cTrader
  • Alpaca
  • TradingView
  • Dukascopy
  • HistData
  • MetaTrader

Technologies named here

  • Windows
  • macOS
  • .NET
  • Trading Hub
  • Claude Code
  • MCP server
  • Roslyn
  • Avalonia
  • SkiaSharp
  • .NET SDK 10
  • ATAS Indicators
  • Model Context Protocol
  • Claude
  • C#

Techniques named here

  • Bayesian optimization
  • Smart walk-forward
  • PBO and CPCV with embargo
  • Monte Carlo and market-regime analysis
  • AI risk agent
  • Staged porting with Claude Code