Trade it on MetaTrader 5

qkt trades any MetaTrader 5 broker account through mt5-gateway, which runs the real MT5 terminal headless in Docker. You give it your account number, password and the broker's server name.

Video: Connect qkt to MetaTrader 5

A recorded walkthrough of this guide is coming soon.

This places real orders. Use a demo account first, keep the gateway's ports on your own machine (never open them to the internet), and read the risk disclosure.

1. What you need

  • Docker with Docker Compose.
  • An MT5 account and your broker's exact server name (for example, Exness-MT5Trial9).

2. Start qkt and the gateway together

The qkt repository ships a Compose file that starts both:

cd qkt
cp .env.example .env          # add your MT5 login, password, server name and an API key
cp qkt.config.yaml.example qkt.config.yaml
docker compose up -d

Check that the gateway has logged in to your account:

curl -H "Authorization: Bearer $MT5_API_KEY" http://localhost:5001/health/ready
# {"status":"ready", ...}

3. Point the strategy at your broker

In the strategy file, change each symbol's BACKTEST: prefix to the broker profile name, MT5: in the default setup. Nothing else changes:

SYMBOLS
    gold = MT5:XAUUSD EVERY 5m     -- was BACKTEST:XAUUSD

4. Deploy, then watch it

docker compose exec qkt qkt deploy /strategies/gold-ema-pullback-v1.qkt --as gold
docker compose exec qkt qkt status gold
docker compose exec qkt qkt logs gold --follow

Start with the smallest position size your broker allows and compare live fills with the research for a few weeks before sizing up. Watching it is easier with qkt-insights.

Going further