Skip to main content

DCA & Scaled Orders

Two ways to spread an entry across multiple price levels. DCA is a market entry plus N follow-up limits spaced by a percent. Scaled orders is a pure ladder of N limits across an explicit price band — no market component.

TL;DR
  • DCA: market order + dcaOrderCount evenly-sized limit orders spaced by dcaPercent from the initial fill.
  • Scaled: scaledOrderNumbers limit orders placed between scaledLowerPrice and scaledUpperPrice, distributed by scaledOrderStyle.
  • DCA total spread is from dcaPercent. Scaled total spread is the explicit upper/lower price band.
  • Cancel a pending DCA mesh with the standalone cancelAllDca: true payload.
TradingView placeholders

dcaPercent, scaledUpperPrice, scaledLowerPrice accept Pine placeholders. See Anatomy → Dynamic values via TradingView placeholders.

Quick reference table

PropertyTypeRequiredDefaultDescription
useDcaboolnofalseEnable the order-mesh entry style: initial market order plus N evenly-sized limit orders below (long) or above (short) entry.
dcaPercentdecimalconditional0Total spread of the DCA mesh from the initial entry, in percent. TVH spreads dcaOrderCount limits evenly across this range.
dcaOrderCountintconditional0Number of follow-up limit orders in the DCA mesh (not counting the initial market order).
useScaledOrdersboolnofalseEnable scaled-orders ladder mode. Differs from DCA: you supply an explicit upper/lower price band rather than a percent spread, and there is no market component.
scaledUpperPricedecimalconditional0Upper price bound of the scaled ladder. For shorts this is the highest entry; for longs the worst (highest) limit if the ladder lays out top-down.
scaledLowerPricedecimalconditional0Lower price bound of the scaled ladder.
scaledOrderNumbersintconditional0Number of limit orders to place across the upper/lower band.
scaledOrderStylestringnoSize distribution style across the ladder. even = each leg the same size. bigSmall = larger legs at the better-priced side, smaller legs at the worse. smallBig = the inverse.
scaledUseCurrentPriceboolnofalseWhen true, treat the current mark/last price as one bound and use only scaledUpperPrice or scaledLowerPrice as the other bound (whichever is set).

DCA — order mesh

DCA on TVH is initial market fill + N evenly-sized limit orders, all on the same side. Spreads exposure across price levels in case the market keeps moving against the initial entry.

Payload

{
"exchange": "binance-futures",
"pair": "BTCUSDT",
"apiKey": "binance-futures-main",
"isBuy": true,
"isMarket": true,
"units": 0.05,
"useDca": true,
"dcaPercent": 2.0,
"dcaOrderCount": 4,
"token": "<token>"
}
  • Initial fill: market buy of 0.01 BTC (units / (dcaOrderCount + 1) = 0.05 / 5 = 0.01).
  • DCA legs: four additional limits, evenly spaced from the initial entry down to 2% below entry. So 0.5%, 1.0%, 1.5%, 2.0% below.
  • Total exposure if all fill: 0.05 BTC. Average entry pulled lower toward 64200 territory.

Sizing math

units is the total position size if the entire mesh fills. TVH splits evenly:

per-leg size = units / (dcaOrderCount + 1)

The + 1 accounts for the initial market fill. With units=0.05 and dcaOrderCount=4, each leg is 0.01 BTC.

When you combine DCA with percent-of-balance sizing (unitsType: "percent"), the percent applies to the total mesh. Each leg is (percent / (count + 1)) of balance.

DCA + stop loss

Attach a stop to the whole mesh so a runaway move closes the entire position. Set the SL wider than the DCA spread so it sits beyond the deepest leg. Here the mesh reaches 3% below entry and the SL is at 4%, leaving a 1% buffer under the last fill:

{
"exchange": "binance-futures",
"pair": "BTCUSDT",
"apiKey": "binance-futures-main",
"isBuy": true,
"isMarket": true,
"units": 0.05,
"useDca": true,
"dcaPercent": 3,
"dcaOrderCount": 4,
"stopLossType": "percent",
"stopLossPercent": 4,
"token": "<token>"
}

stopLossPercent is measured from the average entry of the legs that actually fill, so the deeper the mesh fills, the lower the absolute stop. Keep stopLossPercent > dcaPercent — otherwise a deep fill can sit at or beyond the stop and trigger an immediate close.

DCA + multi-TP — validation rule

{
"useDca": true,
"dcaPercent": 1.5,
"dcaOrderCount": 3,
"targetType": "percent",
"targets": [
{ "takeProfitPercent": 0.8, "amount": 33 },
{ "takeProfitPercent": 1.6, "amount": 33 },
{ "takeProfitPercent": 2.4, "amount": 34 }
],
"targetAmountInPercent": true
}

Each DCA leg gets its own TP order sized to its share of the position. The exchange's minimum-order-size constraint (minSize) applies per leg. If per-leg-size × target-amount-percent / 100 drops below minSize, the exchange rejects the TP and the mesh runs without that TP.

Practical impact: with very small positions, very small targets, or very large mesh counts, you can end up with an entry that fills but TPs that never get placed. Test on testnet.

Cancelling a pending DCA mesh

{ "cancelAllDca": true }

A standalone payload that cancels every open DCA leg on the pair (TP/SL and unrelated limits stay) and does nothing else. No entry. No close. This is the field that clears a pending mesh immediately.

Don't confuse it with cancelAllDcaOrders

The similarly named cancelAllDcaOrders flag does not cancel a mesh on demand. It is a trailing-stop companion that cancels remaining orders only when a trailing stop later closes the position. Use cancelAllDca to clear a mesh now. See Close & Cancel.

Scaled orders — explicit ladder

Scaled is different from DCA in three ways:

  1. No initial market fill. Every order is a limit.
  2. Explicit price band (scaledLowerPrice, scaledUpperPrice) instead of a percent spread.
  3. Distribution style (scaledOrderStyle) controls how sizes vary across the ladder.

Payload — long ladder

{
"exchange": "binance-futures",
"pair": "BTCUSDT",
"apiKey": "binance-futures-main",
"isBuy": true,
"isLimit": true,
"units": 0.05,
"useScaledOrders": true,
"scaledLowerPrice": 63500,
"scaledUpperPrice": 64500,
"scaledOrderNumbers": 5,
"scaledOrderStyle": "even",
"token": "<token>"
}

Five limit buys distributed between 63500 and 64500. With scaledOrderStyle: "even", each leg is 0.01 BTC (= 0.05 / 5).

Distribution styles

scaledOrderStyle controls size variation across the ladder:

StyleBehaviour
"even"Every leg the same size. Default when the field is empty.
"bigSmall"Larger orders at the better-priced end of the ladder, smaller at the worse end. Orientation depends on isBuy vs isSell.
"smallBig"The inverse — smaller orders at the better-priced end, larger at the worse end. Useful when you expect the deepest leg to be where the actual reversal sits.

For a long ladder (buys between scaledLowerPrice and scaledUpperPrice): the better-priced legs are the lowest prices; worse-priced are the highest. For a short ladder, it inverts. The Trade Command Builder UI previews per-leg sizes before you submit — use that to confirm orientation matches intent.

Current-price anchored ladder

{
"useScaledOrders": true,
"scaledLowerPrice": 63500,
"scaledUpperPrice": 0,
"scaledUseCurrentPrice": true,
"scaledOrderNumbers": 5
}

scaledUseCurrentPrice: true tells TVH to use the current mark/last price as one bound. Whichever of scaledLowerPrice / scaledUpperPrice you leave at zero is the bound replaced by current price.

In the example above: ladder from current price (the upper bound) down to 63500 (the lower bound). Useful for "ladder from here down".

Detail per property

useDca

AttributeValue
Typebool
Requiredno
Defaultfalse

Enable the DCA order-mesh entry style.

dcaPercent

AttributeValue
Typedecimal
Requiredconditional (when useDca=true)
Default0
TV placeholder compatibleyes

Total spread of the DCA mesh from the initial entry, in percent. With dcaPercent: 2.0, the furthest leg sits 2% from the initial fill.

dcaOrderCount

AttributeValue
Typeint
Requiredconditional (when useDca=true)
Default0

Number of follow-up limit orders in the DCA mesh. Does not include the initial market order.

useScaledOrders

AttributeValue
Typebool
Requiredno
Defaultfalse

Enable scaled-orders ladder mode. Mutually exclusive with useDca — pick one.

scaledUpperPrice

AttributeValue
Typedecimal
Requiredconditional (when useScaledOrders=true)
Default0
TV placeholder compatibleyes

Upper price bound of the ladder.

scaledLowerPrice

AttributeValue
Typedecimal
Requiredconditional (when useScaledOrders=true)
Default0
TV placeholder compatibleyes

Lower price bound of the ladder.

scaledOrderNumbers

AttributeValue
Typeint
Requiredconditional (when useScaledOrders=true)
Default0

Number of limit orders placed across the band.

scaledOrderStyle

AttributeValue
Typestring
Requiredno
Allowed values"even", "bigSmall", "smallBig"
Default"" (treated as "even")

Size distribution style. See the table above.

scaledUseCurrentPrice

AttributeValue
Typebool
Requiredno
Defaultfalse

Treat current mark/last price as one bound. Whichever of scaledLowerPrice / scaledUpperPrice is 0 gets replaced.

DCA vs scaled — when to use which

SituationUse
Want immediate market exposure plus safety netDCA
Spec'd a precise band where price is expected to roamScaled
Don't know current price, just a "% below" ruleDCA
Know exact support/resistance levelsScaled
Multi-TP planned on the whole positionBoth work; DCA is the more common pairing

Common mistakes

  • Confusing units semantics. units is the total mesh size, not the per-leg size. With dcaOrderCount: 4 and units: 0.05, each leg is 0.01 BTC.
  • Setting both useDca and useScaledOrders. They're mutually exclusive. TVH picks whichever flag is processed first by the adapter — unreliable. Pick one.
  • DCA with postOnly: false against a fast move. The first DCA leg can fill instantly as taker if price moves through. Keep postOnly: true (default) for DCA legs.
  • Scaled ladder crossing current price. A long ladder where scaledUpperPrice is above the current ask immediately fills the top legs. That's usually not what you want — check the band against the current quote before submitting.

Next

Limit Order Management — the chase logic, update flows, and the limit-close pattern.