排查没有n笔交易+4

This commit is contained in:
zhangkun9038@dingtalk.com 2025-11-27 12:56:27 +08:00
parent bb71005c80
commit f37db0fc2e

View File

@ -311,8 +311,15 @@ rm ./user_data/backtest_results/*
# 更新配置文件的 max_open_trades
echo "正在更新配置文件中的 max_open_trades..." >&2
jq '.max_open_trades = 150' "config_examples/$CONFIG_FILE" > "config_examples/$CONFIG_FILE.tmp" && \
mv "config_examples/$CONFIG_FILE.tmp" "config_examples/$CONFIG_FILE"
python3 << 'EOF'
import json
config_file = "config_examples/$CONFIG_FILE"
with open(config_file, 'r') as f:
config = json.load(f)
config['max_open_trades'] = 150
with open(config_file, 'w') as f:
json.dump(config, f, indent=2)
EOF
echo "✅ 已设置 max_open_trades = 150" >&2
echo "docker-compose run --rm freqtrade backtesting $PAIRS_FLAG \