feat: improve strategy studio and fix trader deletion bug

- Add strategy export/import functionality to Strategy Studio
- Fix trader deletion not removing from memory (competition page ghost data)
- Simplify TraderConfigViewModal: remove unused fields, show strategy name
- Improve quant data formatting: OI/Netflow multi-timeframe display
- Add configurable OI/Netflow toggles in indicator settings
- Clean up unused frontend components and dead code
This commit is contained in:
tinkle-community
2025-12-09 16:46:58 +08:00
parent 48792907b3
commit 9fa2432705
20 changed files with 258 additions and 2348 deletions

View File

@@ -1,93 +0,0 @@
// 系统状态
export interface SystemStatus {
is_running: boolean
start_time: string
runtime_minutes: number
call_count: number
initial_balance: number
scan_interval: string
stop_until: string
last_reset_time: string
ai_provider: string
}
// 账户信息
export interface AccountInfo {
total_equity: number
available_balance: number
total_pnl: number
total_pnl_pct: number
total_unrealized_pnl: number
margin_used: number
margin_used_pct: number
position_count: number
initial_balance: number
daily_pnl: number
}
// 持仓信息
export interface Position {
symbol: string
side: string
entry_price: number
mark_price: number
quantity: number
leverage: number
unrealized_pnl: number
unrealized_pnl_pct: number
liquidation_price: number
margin_used: number
}
// 决策动作
export interface DecisionAction {
action: string
symbol: string
quantity: number
leverage: number
price: number
order_id: number
timestamp: string
success: boolean
error: string
}
// 决策记录
export interface DecisionRecord {
timestamp: string
cycle_number: number
input_prompt: string
cot_trace: string
decision_json: string
account_state: {
total_balance: number
available_balance: number
total_unrealized_profit: number
position_count: number
margin_used_pct: number
}
positions: Array<{
symbol: string
side: string
position_amt: number
entry_price: number
mark_price: number
unrealized_profit: number
leverage: number
liquidation_price: number
}>
candidate_coins: string[]
decisions: DecisionAction[]
execution_log: string[]
success: boolean
error_message: string
}
// 统计信息
export interface Statistics {
total_cycles: number
successful_cycles: number
failed_cycles: number
total_open_positions: number
total_close_positions: number
}