util_grid
Calculate grid trading levels with arithmetic or geometric spacing. Define price range, number of levels, and optional tick size precision.
Instructions
计算网格交易层级。支持等差(arithmetic)和等比(geometric)两种间距模式。tickSize 可限制输出精度
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lower | Yes | 网格下限价格 | |
| upper | Yes | 网格上限价格 | |
| levels | Yes | 网格层级数(≥2) | |
| spacing | No | 间距模式 | arithmetic |
| tickSize | No | 最小价格精度(tick size) |