Skip to content
All library documents

Building an Infinite Arithmetic-Spacing Spot Grid Strategy

Article FMZ digest · Author: 发明者量化-小小梦

Summary

This tutorial outlines the design of a simple crypto spot grid with a fixed price gap between adjacent levels, market orders, and levels extending above and below a starting price. It first frames requirements, then represents each grid level as a price paired with flags recording whether a buy or sell action has occurred. The example generates ten levels per side and skips lower levels that would be at or below zero.

Trading logic is based on detecting price crossings between observations: a downward crossing can trigger a buy, while an upward crossing can trigger a sell. The tutorial emphasizes that a crossing alone should not automatically cause another trade. If price repeatedly moves across the same level, the strategy could churn and accumulate fees, so the per-level state flags are intended to help prevent repeated actions. The article stops before presenting the complete order rules or a full running strategy. It provides no backtest or performance evidence, and leaves practical details such as capital allocation, order failures, and treatment of fees for later discussion.

Key ideas

  • The example uses a constant absolute price gap to build an expanding spot grid around a starting price.
  • Each grid level stores its price and state flags for buy and sell actions.
  • A crossing is detected by comparing prices from successive observations against a grid level.
  • Repeated crossings can cause excess trading, so the strategy needs state checks beyond the crossing signal.
  • The tutorial presents an unfinished design and provides no evidence of profitability.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.