Skip to content
All library documents

A Spot Grid Bot That Switches to Defense After Falling Prices

Article Strategy library · Author: 量化多杰

Summary

This ETH/USDT spot strategy runs a price grid while in attack mode. It places staggered buy orders and sells filled positions at grid levels, sizing orders as a fraction of total account value divided across the configured node count. The user can tune capital allocation, grid size, and the thresholds for changing modes.

When price moves below the grid after the configured number of levels is filled, the bot enters a liquidation routine: it cancels orders, sells holdings, and switches to defense. In defense, it tracks profitable grid cycles and returns to attack after reaching the configured threshold. The published description explicitly warns that its backtest could not avoid severe market crashes. The supplied settings cover only one month of minute data, and the document provides no performance results, so it does not establish profitability or robust crash protection.

Key ideas

  • The bot places buy and sell orders across a configurable spot price grid.
  • Order size is based on account value, the attack allocation, and the number of grid nodes.
  • When a full grid is breached to the downside, the bot cancels orders and attempts to liquidate its holdings.
  • Defense mode resumes grid trading after its accumulated profit count reaches the attack threshold.
  • The author says backtesting did not show that the design could withstand major market crashes.

Tags

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