Store initial_lots on roll groups, submit market roll as CTP pending legs with cancel closing empty groups, and backfill first-lots for existing active groups.
Co-authored-by: Cursor <cursoragent@cursor.com>
Revive and sync active monitors from live positions before listing roll candidates, show ineligible monitors with reasons, and validate eligibility on preview.
Co-authored-by: Cursor <cursoragent@cursor.com>
Recalculate position quotes from resolved entry instead of stale CTP PositionProfit, and hide the auto-connect disabled banner once CTP is connected.
Co-authored-by: Cursor <cursoragent@cursor.com>
Correct PosiDirection 2=long/3=short so OpenCost caches under the right key, prefer open_cost over PositionCost for entry and float P/L, and refresh the cache when incomplete.
Co-authored-by: Cursor <cursoragent@cursor.com>
Move business code under modules/, env template to config/, PM2 single qihuo process, and _legacy shims for old imports.
Co-authored-by: Cursor <cursoragent@cursor.com>