Initialize crypto_monitor_user (user edition) from monitor codebase.

Retarget git remote, install path, and deploy docs from crypto_monitor to crypto_monitor_user.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-17 16:18:13 +08:00
commit 53863559f4
608 changed files with 162764 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
"""Tests for trend strategy snapshot backfill helpers."""
from scripts.backfill_trend_strategy_snapshots import (
infer_exit_price,
resolve_result_label,
)
def test_infer_exit_price_short_stop_loss():
exit_p = infer_exit_price("short", 0.336, 4.85, 10, -2.45)
assert exit_p is not None
assert abs(exit_p - 0.353) < 0.002
def test_resolve_result_label_from_plan_status():
plan = {"status": "stopped_sl", "message": "stopped_sl"}
assert resolve_result_label(plan, None) == "止损"
def test_resolve_result_label_prefers_plan_status():
plan = {"status": "stopped_sl"}
trade = {"result": "移动止盈"}
assert resolve_result_label(plan, trade) == "止损"