Skip to content

Commit bc1767c

Browse files
Your Namecursoragent
andcommitted
Document dynamic grids, resume, and PnL analytics in READMEs.
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 08e3e92 commit bc1767c

2 files changed

Lines changed: 36 additions & 10 deletions

File tree

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,27 +79,40 @@ Testnet / Mainnet require a private key before start. Never share it.
7979
2. **Configure grid** — symbol, range, levels, size, leverage → **Preview****Start**.
8080
3. **Run panel** — watch status, PnL, and fills; **Pause / Resume / Stop** as needed (Stop cancels and flattens).
8181

82-
You can also set spacing (arithmetic / geometric), margin mode (cross / isolated), breakout behavior, max drawdown, and daily loss; import / export strategy configs is supported.
82+
You can also set spacing (arithmetic / geometric), margin mode (cross / isolated), fixed / dynamic grid, breakout behavior, max drawdown, and daily loss; import / export strategy configs is supported. The PnL analytics tab shows all-session totals and equity curves.
8383

8484
## Common settings
8585

8686
| Setting | Notes |
8787
|------|------|
8888
| Run mode | **Simulation** (no real funds) / **Testnet** / **Mainnet** |
8989
| Symbol | Hyperliquid perps (e.g. BTC); not spot grids |
90-
| Lower / upper price | Price band covered by the grid |
90+
| Lower / upper price | Grid band; in dynamic mode filled from ATR (refreshable) |
91+
| Fit range from mid % | Quick ±N% band around live mid (`RANGE_PCT`) |
9192
| Grid levels | Number of layers in the band (start with defaults) |
9293
| Total notional | Planned notional in USDC; too little per level blocks start |
94+
| Spacing | Arithmetic / geometric |
95+
| Margin mode | Cross / isolated |
9396
| Leverage | Amplifies both gain and loss |
94-
| On breakout | Alert only / Pause / Cancel & pause |
95-
| Max drawdown / daily loss | Circuit breaker; stops new orders |
97+
| Grid mode | **Fixed**: manual bounds; **Dynamic**: ATR band, optional soft recenter with position kept (`GRID_MODE`) |
98+
| ATR candle interval | Candle interval for ATR, e.g. `15m` / `1h` (`ATR_INTERVAL`) |
99+
| ATR period | ATR lookback bars, default 14 (`ATR_PERIOD`) |
100+
| ATR multiplier | Half-width ≈ ATR% × mult, clamped ~2%–12% (`ATR_MULT`) |
101+
| Breakout confirm bars | Closed candles outside the band before recenter / breakout action (`CONFIRM_BARS`) |
102+
| Recenter cooldown / max per day | Limits how often dynamic grids may migrate |
103+
| On breakout | Fixed: pause / cancel-stop, etc.; dynamic defaults to **recenter (keep position)** |
104+
| Max drawdown / daily loss | Circuit breaker; cancel and flatten |
105+
| Max consecutive order failures | Halt after this many failures (`MAX_ORDER_FAILURES`) |
106+
| Auto-start on launch | Start from saved config if no resumable session (`AUTO_START`) |
107+
| Resume on restart | Restore open session state when possible (`RESUME_ON_RESTART`) |
108+
| Close-window policy | Default **preserve** exchange orders/position (`EXIT_POLICY=preserve`); **Stop** cancels and flattens the strategy symbol |
96109

97110
## Safety
98111

99112
- Crypto and perps are risky; you can lose money — higher leverage means higher risk.
100113
- Keep the private key on this machine only; never send it to anyone or upload it.
101114
- Practice on Simulation / Testnet first; start small on mainnet.
102-
- On Stop, quit, or restart, the app tries to cancel orders and flatten — watch fees and positions.
115+
- **Stop** cancels and flattens the strategy symbol; closing the window by default **preserves** exchange orders/position (resumable) — watch fees and positions.
103116

104117
## Disclaimer
105118

README.zh-CN.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,27 +79,40 @@ Linux 还需安装 WebKit 等系统依赖(如 `libwebkit2gtk-4.1-dev`),否
7979
2. **配置网格** — 选择交易对、价格区间、格数、总投入、杠杆等 → **预览网格****启动**
8080
3. **运行面板** — 查看状态、盈亏与成交;需要时 **暂停 / 恢复 / 停止**(停止会撤单并平仓)。
8181

82-
也可在配置页调整间距(等差 / 等比)、保证金模式(全仓 / 逐仓)、突破后行为,以及最大回撤、单日亏损等风控项;支持导入 / 导出策略配置。
82+
也可在配置页调整间距(等差 / 等比)、保证金模式(全仓 / 逐仓)、固定 / 动态网格、突破后行为,以及最大回撤、单日亏损等风控项;支持导入 / 导出策略配置。收益分析页可查看全部会话合计与净值曲线
8383

8484
## 常用配置说明
8585

8686
| 项目 | 说明 |
8787
|------|------|
8888
| 运行模式 | **模拟盘**(无真实资金)/ **测试网** / **主网** |
8989
| 交易对 | Hyperliquid 永续列表(如 BTC),不做现货网格 |
90-
| 价格下沿 / 上沿 | 网格覆盖的价格区间 |
90+
| 价格下沿 / 上沿 | 网格覆盖的价格区间;动态网格下由 ATR 估算,也可刷新后覆盖 |
91+
| 现价贴合区间 % | 「按现价 ±N%」快速填上下界(`RANGE_PCT`|
9192
| 网格数量 | 区间内分层层数(建议先用默认,再按习惯调整) |
9293
| 总名义投入 | 计划投入的名义金额(USDC);每格过小会无法启动 |
94+
| 间距 | 等差 / 等比 |
95+
| 保证金模式 | 全仓 / 逐仓 |
9396
| 杠杆 | 放大收益与风险;越高越危险 |
94-
| 突破后行为 | 价格冲出区间后:仅告警 / 暂停 / 撤单并暂停 |
95-
| 最大回撤 / 单日亏损 | 触发后熔断,停止继续下单 |
97+
| 网格模式 | **固定**:沿用手动上下界;**动态**:按 ATR 算活动区间,突破确认后可带仓迁移(`GRID_MODE`|
98+
| ATR K 线周期 | 动态网格用的 K 线周期,如 `15m` / `1h``ATR_INTERVAL`|
99+
| ATR 周期 | ATR 计算根数,默认 14(`ATR_PERIOD`|
100+
| ATR 乘数 | `半宽% ≈ ATR% × 乘数`,再夹到约 2%~12%(`ATR_MULT`|
101+
| 突破确认根数 | 连续多少根 K 线在区间外才触发迁移 / 突破动作(`CONFIRM_BARS`|
102+
| 迁移冷却 / 每日最大迁移 | 动态网格 recenter 的最短间隔与单日上限 |
103+
| 突破后行为 | 固定网格:暂停 / 撤单停等;动态网格默认 **确认后迁移(保留仓位)** |
104+
| 最大回撤 / 单日亏损 | 触发后熔断,撤单并平仓 |
105+
| 最大连续下单失败 | 连续失败达到次数后熔断(`MAX_ORDER_FAILURES`|
106+
| 启动时自动开跑 | 打开程序且无可恢复会话时,按当前配置自动启动(`AUTO_START`|
107+
| 重启后续跑 | 有可恢复会话时自动恢复挂单与状态(`RESUME_ON_RESTART`|
108+
| 关闭窗口策略 | 默认 **保留** 交易所挂单与仓位(`EXIT_POLICY=preserve`);**停止**按钮才会撤单并平仓策略标的 |
96109

97110
## 安全提醒
98111

99112
- 加密货币与永续合约存在较高风险,可能导致资金损失;杠杆越高风险越大。
100113
- 私钥仅保存在本机,请勿发给任何人,也不要提交到网盘或聊天工具。
101114
- 务必先用模拟盘或测试网练习;主网请从小资金开始。
102-
- 停止、关闭软件或重新启动前,程序会尝试撤单并平仓,请留意仓位与手续费。
115+
- **停止**会撤单并平仓策略标的;默认关闭窗口会**保留**交易所挂单与仓位(可恢复),请留意仓位与手续费。
103116

104117
## 免责声明
105118

0 commit comments

Comments
 (0)