44bec23296
Replace percent-based risk with system fixed amount, support market/breakout add modes only, allow pending submission outside trading hours, and fix short breakout geometry plus route registration. Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
843 B
Python
27 lines
843 B
Python
"""Deploy roll strategy overhaul."""
|
|
import paramiko, sys
|
|
from pathlib import Path
|
|
|
|
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
root = Path(__file__).resolve().parents[1]
|
|
files = [
|
|
"strategy/strategy_roll_lib.py",
|
|
"strategy/strategy_roll_monitor_lib.py",
|
|
"strategy/strategy_db.py",
|
|
"install_trading.py",
|
|
"app.py",
|
|
"templates/strategy.html",
|
|
"static/js/strategy.js",
|
|
]
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect("192.168.8.21", username="root", password="woaini88", timeout=15)
|
|
sftp = c.open_sftp()
|
|
for rel in files:
|
|
sftp.put(str(root / rel), f"/opt/qihuo/{rel.replace(chr(92), '/')}")
|
|
print("uploaded", rel)
|
|
sftp.close()
|
|
_, o, _ = c.exec_command("cd /opt/qihuo && pm2 restart qihuo")
|
|
print(o.read().decode("utf-8", errors="replace"))
|
|
c.close()
|