Products Write & test
The qkt engine.
Write trading strategies in a SQL-like language. Backtest them deterministically, then run the same code on paper or a demo account.
Pre-1.0 · paper and demo accounts- Latest release
- v0.56.1
- Licence
- Apache-2.0
- Runtime
- bundled on Linux x64
- Indicators
- 59, hand-tested
momentum.qkt
STRATEGY momentum VERSION 1SYMBOLS btc = BACKTEST:BTCUSD EVERY 15mRULES WHEN ema(btc.close, 9) CROSSES ABOVE ema(btc.close, 21) AND POSITION.btc = 0 THEN BUY btc SIZING 0.1 BRACKET { STOP_LOSS BY 1.0 PCT, TAKE_PROFIT BY 2.0 PCT }The whole strategy, eight lines.
winning trade losing trade still open
- Profit
- +609.47 USD
- Trades closed
- 19
- Worst drop
- 3.1%
Hypothetical backtest, not a result to expect. August 2026 was picked after looking at the last twelve months, as the most recent profitable one. Only 6 of the twelve made money, and together they lost 1,178.30 USD. Fills are at the middle price with no spread, commission or slippage, so real results would be lower. One trade was still open at the end. Risk disclosure.
In motion
Same file, same data, same result.
Run the file twice and compare. The profit and the checksum match, because a backtest has no hidden randomness.

The language
Strategies read like the idea.
A strategy is one small file: streams at the top, rules underneath. Walk through a real one, line by line.
Under the hood
From a bar to a fill, in order.
One real trade from the August backtest: the bar that closed, the rule that fired, the risk gate, the fill, and what it did to equity. Values come from the run's own files; two stages that qkt does not journal are marked derived.

Honest by default
It tells you what it assumed.
Every backtest prints its assumptions, like fills at the middle price, no spread or slippage, so you know what a result is worth. Add --broker mt5-sim to model spread and lot sizes.
Backtest and live build the same pipeline, and a parity test checks that they trade identically, in the cases it covers, against the paper broker. Where a real venue differs, it is written down.
The path
- 1Write and testqkt engine
- 2Connect a broker or venueMT5 gatewayVenue gateway
- 3Set limits on the accountGuardrails
- 4Watch it runqkt Insights
Write your first strategy today.
One command to install. Eight lines to a backtest. Free and open source.