# DCA and TWAP

Source: https://ballistic.app/docs/trade/dca/

After this, you'll be able to set a token to buy or sell itself automatically, on your schedule, and walk away.

DCA (dollar-cost averaging) automates recurring buys or sells at a set interval, so you build or exit a position gradually instead of all at once. This time-sliced approach is also called TWAP (time-weighted average price).

## When to use it [#when-to-use-it]

- Building into a position over hours or days instead of one large buy that moves the price against you.
- Exiting a position in slices so your sells don't crash the chart.
- Averaging your entry or exit price across a window instead of betting on a single moment.

**When not to:** you want the whole size filled right now. For that, use a Market order on the [trade panel](https://ballistic.app/docs/trade/trade-panel/).

## How it works [#how-it-works]

You configure one schedule and Ballistic runs it. Each interval, it places a real order of the size you set, until the schedule expires, reaches its end, or you stop it.

You set:

- the **side**, buy or sell
- the **interval**: how often an order fires, in seconds, minutes, hours or days
- the **amount per interval**
- an optional **randomised band**, a min and a max for each interval's size
- an optional **expiry date**

On Solana each order executes fast and automatically as market events land. On a Reserve launch, each DCA sell releases its slice from the reserve. See [Reserve mode](https://ballistic.app/docs/launch/reserve-mode/#after-launch).

## Setting the amount [#setting-the-amount]

A buy amount is set in the native coin (SOL on Solana) or a stablecoin. A sell amount is set as a percent of your holdings, a token amount, a native-coin value or USD.

Sell sizing is a fixed amount or a percentage each interval. A fixed amount sends the same size every time. A percentage sizes each order against your balance at that moment, so the size changes as your balance does.

The optional randomised band varies each interval's size between a min and a max. Use it if you want the orders to look less uniform; leave it off if you want every interval to be the exact size you entered.

## Run a schedule [#run-a-schedule]

1. On the token's [trade panel](https://ballistic.app/docs/trade/trade-panel/), choose the **DCA** order type.
2. Set the side, interval and amount per interval.
3. Set the optional randomised band and expiry date if you want them.
4. Start the schedule. It runs on its own from there.

You can pause, resume or cancel a running schedule at any time.

> **Note**
>
> A paused schedule stops firing but keeps its settings. Resume it and it picks up on the same interval. Cancel it and it's gone.

## What can go wrong [#what-can-go-wrong]

| Symptom | Likely cause | Fix |
|---|---|---|
| Intervals aren't firing | The schedule is paused, or its expiry date has passed | Check the schedule's status and expiry. Resume it if paused, or start a new one if it expired. |
| Each order is bigger or smaller than you expected | The randomised band spreads each interval's size across that range | Narrow the band, or turn it off to fire the exact amount every interval. |
| You sold more than you intended | Percentage sizing on a growing balance sizes each order against a larger balance | Use a fixed amount instead of a percentage for the exact size each interval. |

## Related

- [Trade panel](https://ballistic.app/docs/trade/trade-panel/)
- [Sell panel](https://ballistic.app/docs/trade/sell-panel/)
