A Simple Bitcoin Grid Strategy with Fixed Entry and Profit Levels
Summary
This educational example describes a spot-style grid strategy for BTC/USDT using fixed price levels. It initializes buy levels at regular intervals across a configured range, assigns each level a fixed order amount, and sets a take-profit price above each level. When the market is between adjacent grid prices, the program places a limit buy at the lower level if the available balance meets a minimum threshold. After a buy order is no longer open, it places a sell at the corresponding profit level; when that sell is no longer open, it resets the level for reuse.
The document provides source code and published backtest settings for a one-minute OKEX BTC/USDT simulation spanning July 2019 to January 2020, but reports no performance results. The grid is bounded by its configured price range and uses fixed spacing and profit distance. It includes basic order tracking and failure logging, but does not describe protection against a sustained move outside the grid, inventory exposure, fees, or slippage. Its example parameters are instructional and are not evidence of profitability.
Key ideas
- The strategy creates fixed buy levels at regular price intervals within a predefined range.
- A buy order is considered when the market is between neighboring grid levels and the balance clears a minimum threshold.
- Once a buy is no longer open, the strategy places a sell at its preset profit price.
- The example includes order-state tracking and failure logging, but gives no backtest performance results.
- Fixed grid bounds and spacing leave market, inventory, fee, and slippage risks unaddressed.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.