Skip to content

DCA and execution

DCA bot ATR spacing: freeze the ladder or move it?

The same ATR multiplier can leave a ladder fixed or move its next trigger immediately. Compare three entry ranges and check the full reserve commitment.

Ivory blocks form tight and wide rows beside a lime accordion spacer and a small locking pin on black.
Illustration for dca and execution; examples in this article are educational.

DCA bot ATR safety-order spacing sets the gaps between averaging purchases as multiples of Average True Range. Freeze the ATR at deal entry for a stable ladder, or define precisely when later readings may move unfilled levels. ATR changes where purchases can occur; it does not reduce their quote budget or guarantee a recovery.

The difficult question is what happens after volatility changes. A wider ladder can postpone spending, while a shrinking ATR can pull an unfilled trigger above the latest price. Those are different trading instructions even when both configurations say “1.5 ATR.”

This guide develops an illustrative long, unleveraged spot ladder. The calculations describe a proposed rule, not a claim that a particular bot supports ATR spacing. For the underlying distinction between initial-entry and last-fill references, use the existing safety-order spacing and price-anchor guide.

Specify the ATR observation before the distance

True range is the largest of the candle's high minus low, the absolute high minus previous close, and the absolute low minus previous close. ATR smooths that sequence. TradingView's ATR documentation describes this calculation, its default RMA smoothing and the indicator's lack of price direction.

An ATR of 2 on a market quoted at 100 means a range of 2 quote units per asset unit. It is not automatically 2%. Dividing by a chosen reference price converts the reading to a percentage; changing that reference changes the ratio. A multiple of ATR is also not a probability that price will stay inside a boundary.

Record the symbol and venue, candle interval, length, smoothing, initialization history and last included candle. A 14-period hourly ATR uses hourly observations. A 14-period daily reading is a different input. These settings identify the calculation; they do not establish the best horizon for averaging purchases. The ATR position-sizing example covers converting volatility into quantity, which is a separate decision from spacing.

Use an explicit completed-candle rule. For example, Kraken's OHLC endpoint documentation says its final returned entry belongs to the current, uncommitted timeframe. A consumer using that endpoint must identify that row before treating an ATR as final. Other feeds need their own timestamp and completion checks.

Build a frozen ladder and compare equal budgets

Let the initial confirmed entry price be P0, the stored entry ATR be A0, and the distance multiplier be m. For equally spaced ATR increments anchored to that entry, the illustrative long-side rule is:

Addition price(k) = P0 − k × m × A0

Here k counts additions after the base, starting at one. This formula uses absolute price distances and an unchanged anchor. Progressively widening gaps or a changing anchor require a different formula. Reject nonpositive prices rather than allowing a sufficiently wide ladder to produce invalid instructions.

The example adds owned assets through buys. Before adapting it to sales, the sell-bot versus buy-bot comparison helps separate inventory reduction from adding short exposure. Reversing a price formula alone does not define the required inventory or funding rules.

Assume P0 = 100, four additions and m = 1.5. Compare three invented entry ATR readings. Ignore execution costs and rounding in this first table.

Entry ATRDistance between additionsFour planned addition pricesTotal spent by price 94 under exact-fill assumptions
1 quote unit1.598.5, 97, 95.5, 94912.50 quote units
2 quote units397, 94, 91, 88350.00 quote units
4 quote units694, 88, 82, 76200.00 quote units

Every row has the same 100-unit base purchase and additions costing 100, 150, 225 and 337.50 quote units. The complete purchase allocation is therefore 912.50 in all three cases. The last column assumes an orderly decline from 100 to 94 and complete fills exactly at each crossed level. It is a synthetic calculation, not an observed execution sequence.

A fixed ladder with three-percentage-point increments from the original 100 entry also produces 97, 94, 91 and 88. It matches the middle ATR row at entry. Across deals, that fixed rule keeps its percentage spacing while the ATR rule changes distance with the observed range. Neither comparison establishes better returns.

Freezing the quiet reading does not keep the market quiet. If volatility expands just after entry, the first row still has its tight spacing and can deploy its entire allocation quickly. Conversely, a wide frozen ladder can leave cash unused through a reversal that never reaches its later levels.

Rolling ATR needs a price-update rule

“Recalculate every candle” is incomplete. Does the new ATR redraw all remaining levels from the original entry, or only set the next distance from the latest confirmed fill? Does it affect accepted exchange orders, local conditions, or future orders only?

Continue the middle row. Its first addition has filled at 97. Its second planned level is 94. Later, the observed price is 96 and a completed-candle ATR falls from 2 to 1. No second addition has filled.

Explicit policyProposed second triggerIs observed price 96 at or below it?
Keep entry ATR and original entry anchor100 − 2 × 1.5 × 2 = 94No
Redraw remaining levels from the original entry using current ATR100 − 2 × 1.5 × 1 = 97Yes
Set the next gap from the last confirmed fill using current ATR97 − 1.5 × 1 = 95.5No

The redraw rule makes the second trigger eligible without another fall from 96. Eligibility still does not prove submission or a fill. It also puts the second trigger at the first addition's historical fill price; a decreasing ATR does not preserve distinct levels automatically.

If ATR instead rises to 4 in the same state, a full redraw moves the second trigger to 88, while a next-gap rule places it at 91. A volatility update can therefore move a purchase away from the market as well as toward it. Decide whether either move is permitted before running the strategy.

Preserve filled steps and their costs. Moving an unfilled level must not reset the addition counter or recreate purchases already completed. If existing orders must be replaced, reconcile their fills and cancellation outcomes before reserving money for replacements. A new local price is not evidence that the old exchange instruction disappeared.

Stress the reserve even when spacing widens

The four additions require 100 + 150 + 225 + 337.50 = 812.50 quote units after the base. Wider spacing postpones that commitment in the hypothetical path; it does not remove it.

Suppose three deals have already opened their bases and the account now has 2,200 free quote units, with no open purchase locks. Each deal retains the complete four-addition plan. Their remaining purchases require 3 × 812.50 = 2,437.50. Adding a deliberately chosen 90-unit operating allowance produces a 2,527.50 requirement and a 327.50 shortfall.

The allowance is an illustrative input, not a fee estimate or maximum cost. The full-ladder capital worksheet explains how to separate spent cash, order locks and unplaced commitments. Do not subtract a lock twice from a balance already reported as free.

Stress all three deals becoming eligible together. A plan that depends on selling another holding or receiving a transfer is relying on an additional event. If a funding cap intentionally prevents late additions, record that altered ladder before evaluating it; the original average-entry preview no longer describes all possible outcomes.

This example fixes quote amounts. A fixed asset quantity would consume a different quote amount at each price, so rolling levels would also change its funding calculation. Increasing order sizes when ATR rises introduces another sizing rule and needs a new reserve calculation.

Validate updates and execution separately

First save an event ledger with the candle used, ATR value, anchor, filled-step count, proposed levels and remaining quote commitment. Include a version for every permitted update. Then replay these cases:

  1. ATR contracts while price stays between old levels. Confirm which triggers change and whether any become immediately eligible.
  2. ATR expands after a partial fill. Preserve acquired quantity and establish which remainder may move.
  3. Price jumps across several levels. Distinguish observed crossings from actual accepted and filled purchases.
  4. The ATR input is missing, stale, zero or invalid. Apply a declared reject or fallback policy; do not silently turn an unavailable range into zero spacing.

For scheduled purchases, a missed clock event raises a separate question from a crossed price threshold. The recurring-buy missed-interval guide helps define whether delayed work is skipped or caught up. Do not import that policy into an ATR ladder without explicitly choosing it.

Next apply the venue's executable constraints. Binance's spot filter reference defines price ticks, quantity steps and notional filters. Rounding can merge calculated prices or change intended quote spend. Review the resulting order list and reserve, rather than approving the unrounded ATR sketch.

When comparing frozen, rolling and fixed spacing, hold order amounts, entry conditions, costs and execution assumptions constant. In historical replay, an update based on a candle's closing ATR cannot be used to claim fills earlier inside that same candle. Save only information available at each decision and inspect ambiguous intrabar sequences separately.

Choose the rule you can reconstruct

Frozen ATR offers an unchanged distance reference for one deal. Rolling ATR can respond to later ranges, but it needs explicit permissions for moving prices, handling existing orders and retaining filled-step identity. Neither rule turns the final buying level into a loss boundary: the acquired asset can continue falling after every addition fills.

Before enabling a ladder, export its proposed prices and reserve at entry, after an ATR contraction and after an expansion. If the record cannot explain why each unfilled level moved and which cash still funds it, the update policy is unfinished.

Keep the context with the example.

Each worked example is illustrative, with its sources and assumptions in the article. Read our editorial standards for authorship, verification and corrections.