📘Chapter 2: "Live or Simulated Trading? Freqtrade trade Command Explained"
This article was produced by the Quantitative Trading Lab at https://www.itrade.icu. Visit for more benefits.
freqtrade trade is the core command to start a live or simulated trading bot, and it’s the key step for deploying automated trading in practice.
This article provides an in-depth guide to the trade command, covering usage, common parameters, configuration tips, and Docker deployment, ideal for those preparing for live trading or just finishing strategy backtesting.
🚀 1. Basic Syntax
freqtrade trade \
--config user_data/config.json \
--strategy MyStrategy \
--dry-runParameter Explanation
--config
Path to the configuration file
--strategy
Strategy class to use
--dry-run
Enable dry-run (simulated trading) mode, recommended by default
--logfile
Path to save log output
--db-url
Specify database file or connection (for storing trade history)
--userdir
Set user directory path (default user_data/)
🧪 2. What is Dry-run Mode?
Dry-run mode = no real orders, only simulated orders and log recording.
Suitable for:
✅ Strategy verification (ensure logic is correct)
✅ Test run before live deployment
✅ Avoid real losses from misconfiguration
When ready for live deployment, disable the parameter:
⚠️ It is recommended to run dry-run for at least 7 days before going live!
🧩 3. Multi-strategy Support
You can load multiple strategies or strategy paths via command-line arguments:
Or combine multiple config files (for multi-account / multi-platform):
Notes for multi-strategy:
All strategies must be importable from the specified directory
Use
--strategy-pathto specify additional paths if needed
🐳 4. Running trade in Docker
trade in DockerRunning in a Docker container is safer and easier to deploy, recommended with docker-compose:
Example docker-compose.yml:
After starting, you can access the Web UI to monitor trades:
🧷 5. Recommended Configuration Options
In config.json, it’s recommended to enable the following to ensure safety:
Also recommended to configure:
exchange → key/secret: real API keys needed for live tradinglogging → logfile: log outputdb_url: connect to SQLite/Postgres to store trade history
✅ 6. Pre-Live Checklist
Strategy backtested?
✅ At least 6 months of historical data
Dry-run tested?
✅ Simulated run for 7+ days
Complete config.json?
✅ Include risk management, coins, leverage, etc.
API key set?
✅ And recommend IP whitelist
Monitor logs and errors?
✅ Save logs using --logfile
📌 Summary
The trade command is Freqtrade’s “final step” and the closest to real trading profits.
This article covered:
Basic syntax and parameters of
tradeBenefits and recommended practices for Dry-run
Multi-strategy / multi-config combinations
Full Docker deployment workflow
Mastering these skills will help you transition from a strategy developer to a fully capable automated live trading operator.
Last updated