What is TradeJS?
TradeJS is a TypeScript framework for building, backtesting, and running programmable trading strategies. Its self-hosted runtime keeps infrastructure and execution under your control.
At the simplest level, a TradeJS project contains:
- market data as candles
- one or more strategies that read those candles
- signals that describe possible entries or exits
- a runtime that can backtest, scan, and optionally automate execution
- metrics and artifacts that help you compare strategy behavior
TradeJS is not a black-box trading product. It is a developer framework and runtime stack. You write or configure the strategy, run it against historical data, inspect the output, and decide whether it is suitable for runtime signals or controlled automation on infrastructure you operate.
Primary Workflow
- Write typed strategy logic and indicators in TypeScript.
- Backtest and compare strategy configurations on historical data.
- Promote a selected result into runtime configuration.
- Generate signals and optionally automate execution on your infrastructure.
What You Can Do
- Research strategy ideas with TypeScript.
- Run backtests and compare strategy/config variants.
- Generate runtime signals from the same strategy logic.
- Run the framework locally or on self-hosted infrastructure.
- Register custom strategy, indicator, and connector plugins.
- Add Pine-backed strategy compatibility and AI/ML workflows as optional extensions.
- Inspect results in the installable app.
Public Surface
Use public packages:
@tradejs/corefor config, strategy authoring helpers, indicators, math, time, and figures@tradejs/nodefor Node-only runtime helpers, backtests, Pine strategy loading, and registries@tradejs/clifor setup, backtests, signals, results, AI/ML workflows, and runtime checks@tradejs/appfor the optional web UI@tradejs/basefor the default preset@tradejs/typesfor shared contracts
The recommended project config starts with:
import { defineConfig } from '@tradejs/core/config';
import { basePreset } from '@tradejs/base';
export default defineConfig(basePreset);