auto_trade_sys/scripts/apply_volatility_pullback.sh
薇薇安 bc962d93f9 1
2026-07-08 13:11:48 +08:00

27 lines
770 B
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.

#!/usr/bin/env bash
# 波动回调策略 + 混合白名单(多空)
#
# 规则4H+1H 同向 | 1H 区间靠近前低/前高 | 15m 急跌/急涨触发
# 详见 config/my_batch_volatility_pullback.json
#
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
PYTHON_BIN=""
for _py in \
"${ROOT}/.venv/bin/python" \
"${ROOT}/trading_system/.venv/bin/python" \
"${ROOT}/backend/.venv/bin/python"; do
[ -x "$_py" ] && PYTHON_BIN="$_py" && break
done
PYTHON_BIN="${PYTHON_BIN:-$(command -v python3)}"
DRY_RUN=()
[[ "${1:-}" == "--dry-run" ]] && DRY_RUN=(--dry-run)
exec "$PYTHON_BIN" "$ROOT/scripts/apply_config_patch_only.py" \
--from "$ROOT/config/my_batch_volatility_pullback.json" \
--updated-by "volatility_pullback" \
"${DRY_RUN[@]}"