DCA and grid bots
Updated: 2026-11-14
DCA and grid bots are strategy bots for crypto and stocks. They run on your own exchange or broker account: Bybit or Binance (spot or USDT perpetuals) and US stocks and ETFs through Alpaca. A DCA bot builds a position in steps as the price moves against it and closes everything with one take profit from the average price. A grid bot places a ladder of limit orders across a price range and earns on swings inside it. Both are built in the same strategy builder as any other crypto or stock strategy, and both can be backtested before they touch money.
Where to find it
- Strategies, templates and backtests: Algo Trading. Open the strategy library →
- Running bots: My bots → Strategy bots (crypto or stocks). Open Strategy bots →
- Accounts: Money → Connections. See Brokers and Exchange keys.
Where these bots can trade
| Market | Account |
|---|---|
| Crypto spot | Bybit or Binance spot, Alpaca (USD pairs), or Internal paper |
| Crypto perpetuals | Bybit or Binance USDT perpetuals, or Internal paper |
| US stocks and ETFs | Alpaca, or Internal paper |
The strategy and the account must match: a stock strategy doesn’t go to an exchange, and spot doesn’t go to perpetuals. Internal paper needs no keys: it trades a virtual balance on real market bars.
DCA: safety orders
DCA is a block on a strategy’s entry. After the entry fills, a ladder of limit orders waits below it (above it for a short). Each filled level grows the position and lowers the average price. One take profit from the average closes the whole position.
| Setting | Meaning | Default |
|---|---|---|
| Safety orders | How many ladder levels, 1–50 | 5 |
| Step | Distance from the entry to the first level | 1.5% |
| Step growth | Each next step = previous × this. 1 means equal steps. | 1 |
| First safety order size, × base | First level as a multiple of the entry | 1 |
| Size growth | Each next level = previous × this. 2 means every level doubles. | 1 |
| Take profit | From the average price of the whole position | 1.5% |
| Stop loss | Beyond the last level, for the whole position. Empty means no stop. | empty |
Under the fields the form shows how far the ladder reaches, how much of the capital the full ladder uses, the average price and, on perpetuals, the estimated liquidation. Two red flags to take seriously: “The ladder needs more than the capital” and “Liquidation comes before the last level”.
How a cycle runs: the entry fills → the ladder and the take profit are placed from the fill price → each filled level moves the take profit to the new average → the take profit or stop closes everything and the remaining levels are cancelled → the bot waits for the next entry signal. The bot card shows a DCA cycle block: levels filled, position, average price, next level, take profit and stop.
Grid
A grid has no entry signal of its own. It splits a price range into lines, buys on a line and sells on the next line up. The space between two lines is a cell.
| Setting | Meaning | Default |
|---|---|---|
| Range | From the start price (below and above, in %) or fixed prices | 10% below, 10% above |
| Lines | Including both edges, 3–201. Cells = lines − 1. | 11 |
| Spacing | Equal in % or equal in price | Equal in % |
| Direction | Long, Neutral or Short | Long |
| Capital in the grid | Share of capital split across cells (× leverage on perpetuals) | 90% |
| Close below / above the range by | Stop and take profit beyond the range | off |
- Long buys the cells above the price at start and holds only cash above the range.
- Neutral starts flat and builds a short above the start price and a long below it. Perpetuals only.
- Short sells the cells below the price. Perpetuals only.
The form shows what one cell earns per cycle after both commissions. A cell that doesn’t beat two commissions is refused, because every cycle would lose. When the price leaves the range by the set %, or an exit condition fires, everything closes and the grid stops for good. To trade again, restart the bot. It begins a new grid from the new price.
Library templates
The strategy library has a Grid and DCA shelf with ready templates. Configure copies a template into your strategies, where you can change it.
| Template | Idea |
|---|---|
| Crypto spot DCA: averaging down | A classic spot ladder |
| Crypto spot DCA started by RSI | The ladder starts on an RSI dip |
| Crypto perpetual DCA with a stop | A perpetual ladder with a stop beyond the last level |
| Crypto perpetual: neutral grid | A two-sided grid on perpetuals |
| Crypto spot: long grid | A long-only grid on spot |
Template figures come from a full backtest on the template’s own symbols and period, refreshed about once a day. A figure on history isn’t a forecast. See Strategy library.
Bot limits
Every strategy bot has its own capital and limits:
| Limit | What happens | Default |
|---|---|---|
| Max orders per day | New entries over the limit wait for the next day | 20 |
| Max position, % of capital | An order that would grow a position past it halts the bot | 25 |
| Max daily loss, % | A loss past it halts the bot | 3 |
| First order, % of capital | Live only: the first opening order is cut to this share | 5 |
| Drawdown stop, % | Halts the bot at this fall from its equity peak | off |
DCA and grid strategies count the worst case: the full ladder, or every line on one side filled. With default limits a grid or a long ladder halts on its first bar. The new-bot form warns “The bot’s limits will not let this strategy work” and offers Use these values. On live, small capital split into many cells can produce start orders below the exchange minimum. The form warns about that too.
Going live needs all three main limits and the Start with REAL money? confirmation. A running live bot can’t loosen its limits; stop it first. See Paper, dry run and live.
Limits and risks
- DCA’s main risk is a long move against you. The ladder fills up and the money sits in a loss. Without a stop, the position just waits. A DCA can close every cycle in profit and still sit through a deep drawdown, so check the worst drawdown and worst open loss in the backtest, not only the share of winning cycles.
- On perpetuals, the ladder multiplies exposure. Position size is the share × leverage. Watch the liquidation line in the form.
- A long grid that breaks below its range holds coins bought on the way down. A stop below the range closes them at a loss and ends the grid. Grids earn while the price swings, not when it trends away.
- Stopping a bot without Also close open positions leaves the position open with nobody following the exits.
- Backtests fill a grid line only when a bar passes through it and don’t model the order book. Live fills can differ.
- Keys for these bots should allow trading only, never withdrawals.