tradusai/run_signal.sh
2025-12-02 22:54:03 +08:00

28 lines
1.0 KiB
Bash
Executable File
Raw 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.

#!/bin/bash
# 运行交易信号生成器(量化 + LLM 一体分析)
set -e # 遇到错误立即退出
echo "🚀 开始生成交易信号..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# 检查 scheduler 容器是否运行
if ! docker compose ps scheduler | grep -q "running"; then
echo "⚠️ scheduler 容器未运行,正在启动..."
docker compose --profile scheduler up -d
echo "✅ 等待服务就绪..."
sleep 5
fi
# 运行信号生成API 配置已在 docker-compose.yml 中)
docker compose exec scheduler python /app/scripts/generate_trading_signal.py
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "✅ 信号生成完成!"
echo ""
echo "📊 查看完整结果:"
echo " cat output/latest_signal.json | python -m json.tool"
echo ""
echo "📱 如果是 BUY/SELL 信号,已自动发送钉钉通知"