dekun
d89aff3ad6
Use absolute coin counts in perp-options points mode.
...
Treat 2:4 as 2 perp + 4 option coins instead of normalizing to 1:2, and disable embed page caching so hub iframe picks up trade UI updates.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-29 22:54:16 +08:00
dekun
9f3395de2f
Add sideways max-loss to perpetual-options calculator.
...
Show premium wipeout plus flat round-trip perp fees as case C for both size and points modes.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-29 22:38:20 +08:00
dekun
26bc19f047
Add two-day amplitude window to amp-stats.
...
For each settlement day, also compute H-L over start minus one day through 16:00 (e.g. 25 16:00 to 27 16:00).
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 15:05:38 +08:00
dekun
c81ba147cc
Replace amp-stats straddle/perp overlays with move-points amplitude ratio.
...
Input points now drives amplitude hit share; table keeps both-side moves and amp达标.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 14:56:48 +08:00
dekun
90be23e845
Fix amp-stats perp PnL to exit at daily profit target.
...
Hit A/B via open-to-high/low; day PnL equals target when touched, otherwise settle at close.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 14:41:29 +08:00
dekun
2ce67da8e8
Use daily open as perp-hedge entry and toggle buy-straddle vs perp overlays.
...
Amp-stats now prices premium from each day's open, and the form switches mutually between straddle and perpetual-options对照.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 14:31:17 +08:00
dekun
d049c5d317
Add perpetual-options hedge overlay to amp-stats with hit rates and daily PnL.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 14:20:42 +08:00
dekun
a908dccaba
Add ratio-to-move-points mode for hub perpetual-options calculator.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 12:47:17 +08:00
dekun
4bcf88b5cb
Add hub perpetual-options hedge calculator tab and sizing formula.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 12:37:51 +08:00
dekun
a2075ba73e
Cap options budget-full sizing at min(balance, trade budget) with UI hint.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-26 08:54:38 +08:00
dekun
890659f173
Add key monitor and live trade toggles to instance nav display prefs.
...
Defaults stay on; users can hide them like other top-bar tabs.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-24 00:55:31 +08:00
dekun
ca499c6104
Send WeChat alerts on OKX options open and close.
...
Cover manual, target, and exchange/expiry sync with idempotent sent flags.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-24 00:48:15 +08:00
dekun
54f1857fa2
Sync OKX options closed trades into hub archive with a separate tab.
...
Mirror perpetual archive flow into archive_options_trade_cache for offline calendar and review.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-24 00:39:59 +08:00
dekun
ed3033d793
Add hub strategy compare page for perp vs options vs 7:3 hedge.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-23 14:39:59 +08:00
dekun
910c938d0a
Throttle OKX amp-stats candle pagination and retry on 429.
...
Add page pauses, exponential backoff, and cooldown before swap fallback to avoid rate limits.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-23 02:57:24 +08:00
dekun
0a9e3aa95c
Fix amp-stats long-range candles via OKX history endpoints.
...
Recent candles cap near 60d; continue with history-index/history candles and color profit green/red.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-23 02:53:36 +08:00
dekun
b64c742fc9
Add weekend filter, take-profit, and profit column to amp stats.
...
Long-straddle effective move uses TP on path hit (>=) else abs change; mark Sat/Sun on settlement days.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-23 02:47:20 +08:00
dekun
789ab43dbe
Add long-straddle premium overlay to hub amp stats.
...
Configurable bilateral premium with exceed counts/ratios and settlement PnL for buying volatility.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-23 02:33:23 +08:00
dekun
61e8da1e8b
Add hub-only OKX amp stats for ETH/BTC session windows.
...
Read-only 1H index candles, point amplitude metrics, history save and CSV export; no order-path changes.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-23 02:06:21 +08:00
dekun
58e9c8f85e
Feed options positions and playbook brief into trading coach.
...
Coach context previously omitted options_snapshot details; also inject a short 执行手册 summary each turn.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-22 23:28:16 +08:00
dekun
e7f8e9201e
Show trading playbook in hub strategy docs.
...
Add an 执行手册 tab that renders docs/交易执行手册-期权与Gate.md as the default strategy view.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-21 22:16:54 +08:00
dekun
301a464f29
Add daily loss-count freeze for account risk cooldown.
...
RISK_DAILY_LOSS_LIMIT (default 2, 0 disables) freezes new opens after N losing closes in the trading day.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-21 22:13:38 +08:00
dekun
60ff45f098
Fix hedge option PnL match by parsing opened_at as Asia/Shanghai.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-21 10:21:52 +08:00
dekun
7e7666adfb
Align hedge plan option leg PnL with OKX exchange history.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-21 10:09:44 +08:00
dekun
6876515160
Align options review PnL with OKX positions-history realizedPnl.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-21 10:05:27 +08:00
dekun
1bc12a32c6
Sync exchange PnL when hub loads trade records API.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-21 09:40:42 +08:00
dekun
5b346a5760
Hedge start: re-quote ask and resize OO sheets; add HEDGE_PLAN_BUDGET_BUFFER.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-20 10:09:32 +08:00
dekun
a43cb35d9a
Add end-plan action; never show unfilled option legs as open.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-20 09:36:46 +08:00
dekun
8597e47596
Hedge options open: require full fill (IOC + wait) before success.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-20 09:14:03 +08:00
dekun
72dddc5106
Fix options review screenshots missing after journal upload hijack.
...
Stop journal_upload_slots from binding options slots; resolve journal_* files from static/images root so existing reviews display again.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 16:23:37 +08:00
dekun
12574ae88a
Fix options review empty lists when search box has symbol text.
...
Treat the filter as fuzzy q over underlying/inst/strategy (BTCUSDT->BTC) instead of exact strategy_tag, which always wiped pending rows.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 16:17:45 +08:00
dekun
38ac258497
Color 期期 preview PnL and show RR vs full premium loss.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 15:43:01 +08:00
dekun
7938628485
Fix 期期 sheets bias: split total 2n from same-sheets, not n.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 15:33:00 +08:00
dekun
e3cd2a75de
Replace 期期 equal-split with long/short bias sizing and env ratio controls.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 15:25:10 +08:00
dekun
5e0ce43415
Add instance system guide nav (default off) with overview/options/hedge manual.
...
EOF
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 09:23:30 +08:00
dekun
d74d0aeae0
Park partial hedge plans for manual leg complete instead of auto-close.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 09:06:22 +08:00
dekun
e11c13747a
Add mutual-exclusion gate between hedge plans and standalone options.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 08:51:46 +08:00
dekun
3119486105
Add 期期 close mode (全平/到期平) with scheme-C env toggle.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 08:06:27 +08:00
dekun
b3548240cc
Auto-fill 期期 sheets from trading balance with same-sheets default.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 00:56:35 +08:00
dekun
f21e4d1166
Add env toggles to show/hide perp and options hedge plan tabs.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 00:43:04 +08:00
dekun
778a215ad7
Fix strategy checklist print closing too early.
...
Stop auto-closing the print tab on afterprint (short checklist pages were especially fragile), load print HTML via fetch into a blank window, and use CSS checkboxes instead of Unicode ballot boxes.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-18 16:16:34 +08:00
dekun
faf21da955
Show trade record prices at exchange tick precision.
...
API enriches entry/SL/TP with price_to_precision display strings; OKX formatter now uses the same path as Gate/Binance.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-18 15:41:49 +08:00
dekun
0a14fe73c1
Add key auto-order toggle to instance env config UI.
...
Expose KEY_AUTO_ORDER_ENABLED and KEY_AUTO_MIN_PLANNED_RR under 交易执行 so the frontend matches the settings readout.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-18 15:31:39 +08:00
dekun
8f4ae8ad31
Speed up journal save with AJAX and async K-line charts.
...
Defer exchange chart generation to a background thread and save via XHR so fill-from-trade no longer blocks on full page reload.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-18 15:15:24 +08:00
dekun
813ecdd4ac
Lighten hub options snapshot by skipping history stats.
...
Monitor board only needs positions, balances, and targets; drop the OKX positions-history pull each poll, and surface timeout errors via msg.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-18 15:00:55 +08:00
dekun
173f09300b
Align instance dashboard with hub snapshot+SSE pattern.
...
Background poll builds a memory snapshot; the page reads snapshot and refreshes on SSE instead of hitting heavy exchange APIs on each load.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-17 22:00:30 +08:00
dekun
aabbbef0a9
Turn position/margin/sizing/direction env fields into dropdown selects.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-17 19:41:47 +08:00
dekun
2269bc51ff
Deduct round-trip taker fees from estimated perp PnL.
...
Unify hub/instance TP profit, calc_pnl, and push/accounting to net of 0.05% per side; leave exchange floating PnL unchanged.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-17 15:12:52 +08:00
dekun
549d8a015c
Show pure-option source and net PnL on dashboard.
...
Restore 纯期权 label for non-hedge option rows and use close-preview net PnL instead of exchange upl.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-17 14:32:43 +08:00
dekun
c4c8ad172a
Label dashboard positions from monitor sources with priority.
...
Match hedge/roll/trend/order/key monitors for source badges, show option target monitors in green, and refresh the dashboard with the board 5s cycle.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-17 14:25:36 +08:00