A Fixed-Interval Crypto Grid That Replaces Filled Orders
Summary
This script demonstrates a basic grid for LTC/BTC. At startup, it uses the best ask as a reference price and places a ladder of limit buy orders at regular percentage intervals below it. Each order is sized from a portion of the account balance. The script tracks order identifiers and polls their status on each tick.
When a buy fills, the script places a sell order at a fixed percentage above the buy price. When a sell fills, it places a new buy below that sale price, sizing the replacement to reflect the filled quantity and prices. The published backtest settings specify a 15-minute period over August 2018 on Huobi. The document gives code and settings but no performance results. It does not describe inventory limits, handling for rejected or partially filled orders, fees, or protection against a sustained price move; the grid therefore illustrates order cycling rather than a complete risk-managed strategy.
Key ideas
- The initial grid places limit buys at evenly spaced percentage offsets from a reference ask.
- Each initial buy uses a share of account balance as its allocated amount.
- A filled buy triggers a sell order above its execution price.
- A filled sell triggers a replacement buy below the sale price.
- The document supplies backtest settings but reports no performance evaluation or comprehensive risk controls.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.