Article 2: Start Live Trading or Paper Trading? Freqtrade trade Command Explained

Article 2: 📘 Start Live Trading or Paper Trading? Freqtrade trade Command Explained

The freqtrade trade command is the core command for starting live or simulated trading bots, and it’s the key step for implementing automated trading.

This article will guide you through understanding the usage, common parameters, configuration tips, and Docker-based startup methods of the trade command. It’s suitable for those preparing for live deployment or who have just completed strategy backtesting.

🚀 Want to Learn Quantitative Trading?

👉 Click to visit: https://www.itrade.icu
Here you’ll find Freqtrade Basics Tutorials, Strategy Practice, Indicator Analysis, and more rich content to help you easily master quantitative trading skills!

🚀 I. Basic Syntax

freqtrade trade 
  --config user_data/config.json 
  --strategy MyStrategy 
  --dry-run

Parameter Explanation
| Parameter | Description |
| —————- | ——————————- |
| --config | Specify the configuration file path |
| --strategy | Start with the specified strategy class name |
| --dry-run | Enable dry-run (simulated trading) mode, recommended to enable by default |
| --logfile | Specify the log output location |
| --db-url | Specify the database file or connection (to record trading history) |
| --userdir | Set the user directory path (default user_data/) |

🧪 II. What is Dry-run Mode?

Dry-run mode = No actual orders are placed; only simulated orders and logs are recorded.

Applicable to:

  • ✅ Strategy validation phase (ensure logic is error-free)
  • ✅ Testing run before live deployment
  • ✅ Avoid real losses due to parameter configuration errors
    Once ready for live deployment, disable this parameter:
freqtrade trade --config user_data/config.json --strategy MyStrategy

⚠️ It is recommended to run dry-run tests for at least 7 days before going live with real trading!

🧩 III. Support for Multi-Strategy Execution

Multiple strategies or strategy paths can be loaded via command-line parameters:

freqtrade trade 
  --config user_data/config.json 
  --strategy-path user_data/strategies 
  --strategy MyStrategyA MyStrategyB

Or combine multiple config files (suitable for multi-account / multi-platform):

freqtrade trade -c spot_config.json -c futures_config.json

Notes for multi-strategy:

  • All strategies must be importable in the specified directory
  • Use --strategy-path to specify additional paths

🐳 IV. Starting the trade Command with Docker

Running in a Docker container is safer and easier to deploy. It’s recommended to use docker-compose:

docker compose run --rm freqtrade trade 
  --config /freqtrade/user_data/config.json 
  --strategy MyStrategy 
  --dry-run

Sample docker-compose.yml:

services:
  freqtrade:
    image: freqtradeorg/freqtrade:stable
    volumes:
      - ./user_data:/freqtrade/user_data
    ports:
      - "127.0.0.1:8080:8080"
    command: >
      trade
      --config /freqtrade/user_data/config.json
      --strategy MyStrategy
      --logfile /freqtrade/user_data/logs/freqtrade.log

After starting, access the Web UI to view trading status in real-time:

http://localhost:8080

🧷 V. Some Recommended Configuration Items

In config.json, it is recommended to enable the following configuration items to ensure safety:

{
  "dry_run_wallet": 1000,
  "dry_run": true,  //  Enable dry mode
  "max_open_trades": 3,
  "stake_currency": "USDT",
  "tradable_balance_ratio": 0.9,
  "timeframe": "15m"
}

It is also recommended to configure:

  • exchange → key/secret: Real trading requires providing actual API keys
  • logging → logfile: Log output
  • db_url: Connect to SQLite/Postgres etc. to store trading records

✅ VI. Live Trading Startup Checklist

Checklist Item Recommendation
Has the strategy passed backtesting? ✅ At least cover 6 months or more of history
Has it been run in Dry-run mode? ✅ Simulated run for 7 days or more
Is the config.json configuration complete? ✅ Includes risk control, coins, leverage, etc.
Has the API Key been set? ✅ And recommend setting IP whitelist
Have logs and error outputs been monitored? ✅ Use --logfile to save records

📌 Summary

The trade command is the “final step” command in Freqtrade and the link closest to live trading profits.
This article covers:

  • Basic syntax and parameters of the trade command
  • Advantages and recommended practices of Dry-run
  • Ways to combine multi-strategy / multi-config
  • Full process of starting live trading with Docker
    After mastering these techniques, you can transition from a strategy developer to a true automated trading live deployment expert.

Leave a Reply