QTrade/configs/production.yaml

120 lines
2.9 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# QTrade 实盘环境配置文件
# ==================== 环境配置 ====================
environment:
mode: "production"
# ==================== MySQL 配置 ====================
database:
current_db: "mysql" # 当前使用的数据库类型: mysql/duckdb
mysql:
host: "127.0.0.1"
port: 3306
user: "root"
password: "1234"
database: "qtrade_sim"
pool_size: 5
pool_recycle: 3600
echo: false
duckdb:
filepath: "d:/workspace/QTrade/data/qtrade_live.duckdb"
# ==================== 缓存配置 ====================
cache:
type: "memory" # memory-内存缓存
max_memory_mb: 4096 # 最大内存限制 4GB
# ==================== 日志配置 ====================
logging:
enabled: true
prompt_level: ["ERROR", "WARNING", "INFO"]
filepath: "d:\\workspace\\QTrade\\logs"
max_size: 10485760 # 10MB
backup_count: 5
path: "logs/production"
# ==================== 策略配置 ====================
strategies:
strategy_folder: "d:/workspace/QTrade/configs/strategies"
max_concurrent_strategies: 50
# ==================== 客户端适配器配置 ====================
client_adapters:
production_adapter:
server_url: "ws://localhost:8010/ws/strategy"
timeout: 30 # seconds
# ==================== MiniQMT 实盘交易配置 ====================
miniqmt:
userdata_path: "D:\\国金QMT交易端模拟\\userdata_mini" # MiniQMT userdata_mini 路径
session_id: 123456 # 会话ID(不同策略使用不同ID)
account:
account_id: "40004091" # 模拟交易账号
account_type: "STOCK" # 账户类型(STOCK/HUGANGTONG/SHENGANGTONG)
# ==================== 下载数据源配置 ====================
data_downloader:
downloader: "xtquant"
xtquant:
xtquant_path: "C:\\Program Files\\国金证券QMT交易端\\userdata_mini\\datadir"
xtquant_token: "e83d8eec5226c0b4db4a1d40830e09e4ffe73e15"
optimize_addresses:
- "115.231.218.73:55310"
- "115.231.218.79:55310"
- "218.16.123.11:55310"
- "218.16.123.27:55310"
# ==================== 行情配置 ====================
market:
kline_periods:
- "tick"
- "1m"
- "5m"
- "15m"
- "30m"
- "60m"
- "1d"
- "1w"
# ==================== 技术指标配置 ====================
indicators:
enabled: true
enabled_indicators:
- macd
- kdj
- boll
- rsi
- ma
macd:
fast_period: 6
slow_period: 13
signal_period: 5
kdj:
period: 9
k_period: 3
d_period: 3
boll:
period: 20
std_multiplier: 2.0
rsi:
fast: 6
mid: 12
slow: 24
ma:
periods: [5, 10, 20, 60]
# ==================== 交易配置 ====================
trading:
sessions:
morning:
start: "09:30"
end: "11:30"
afternoon:
start: "13:00"
end: "15:00"
# ==================== 服务端口配置 ====================
services:
trading_service:
host: "0.0.0.0"
port: 8010