Quickstart¶
Five minutes from clone to a running paper-traded strategy. The full canonical version lives at QUICKSTART.md at the repo root — that file is the source of truth and gets updated with every release.
1. Build qkt¶
Requires JDK 21+.
git clone https://github.com/elitekaycy/qkt
cd qkt
./gradlew installDist
export PATH="$PWD/build/install/qkt/bin:$PATH"
qkt --version
You should see qkt 0.22.0 or later.
2. Write your first strategy¶
Create momentum.qkt in your working dir:
momentum.qkt
STRATEGY momentum VERSION 1
SYMBOLS
btc = BACKTEST:BTCUSDT EVERY 1m
RULES
WHEN btc.close > 100
THEN BUY btc SIZING 0.1 BRACKET STOP_LOSS BY 50 PCT TAKE_PROFIT BY 100 PCT
The BACKTEST: prefix means "no live broker" — orders fill against an in-process paper broker.
3. Backtest it¶
Outputs:
out/result.json— machine-readable metricsout/equity_global.csv,out/trades.csv— raw dataout/report.html— single self-contained HTML with equity curve, drawdown table, Monte Carlo fan, per-trade risk
Open out/report.html in a browser.
4. Run it as a daemon¶
qkt daemon & # starts the control plane
qkt deploy momentum.qkt --as momentum
qkt list # shows momentum running
qkt status momentum # current PnL, positions, last trade
qkt logs momentum --follow # live log stream
qkt stop momentum
qkt daemon stop
State (logs, control port) lives at ~/.local/state/qkt/ by default; override with QKT_STATE_DIR.
Next¶
- Deploy paper — go deeper on paper trading
- Deploy MT5 — connect to a real broker
- Concepts: architecture — what's actually happening when you
qkt deploy