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.
- DCA: market order +
dcaOrderCountevenly-sized limit orders spaced bydcaPercentfrom the initial fill. - Scaled:
scaledOrderNumberslimit orders placed betweenscaledLowerPriceandscaledUpperPrice, distributed byscaledOrderStyle. - 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: truepayload.
dcaPercent, scaledUpperPrice, scaledLowerPrice accept Pine placeholders. See Anatomy → Dynamic values via TradingView placeholders.
Quick reference table
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
useDca | bool | no | false | Enable the order-mesh entry style: initial market order plus N evenly-sized limit orders below (long) or above (short) entry. |
dcaPercent | decimal | conditional | 0 | Total spread of the DCA mesh from the initial entry, in percent. TVH spreads dcaOrderCount limits evenly across this range. |
dcaOrderCount | int | conditional | 0 | Number of follow-up limit orders in the DCA mesh (not counting the initial market order). |
useScaledOrders | bool | no | false | Enable 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. |
scaledUpperPrice | decimal | conditional | 0 | Upper 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. |
scaledLowerPrice | decimal | conditional | 0 | Lower price bound of the scaled ladder. |
scaledOrderNumbers | int | conditional | 0 | Number of limit orders to place across the upper/lower band. |
scaledOrderStyle | string | no | — | Size 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. |
scaledUseCurrentPrice | bool | no | false | When 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.
cancelAllDcaOrdersThe 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:
- No initial market fill. Every order is a limit.
- Explicit price band (
scaledLowerPrice,scaledUpperPrice) instead of a percent spread. - 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:
| Style | Behaviour |
|---|---|
"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
| Attribute | Value |
|---|---|
| Type | bool |
| Required | no |
| Default | false |
Enable the DCA order-mesh entry style.
dcaPercent
| Attribute | Value |
|---|---|
| Type | decimal |
| Required | conditional (when useDca=true) |
| Default | 0 |
| TV placeholder compatible | yes |
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
| Attribute | Value |
|---|---|
| Type | int |
| Required | conditional (when useDca=true) |
| Default | 0 |
Number of follow-up limit orders in the DCA mesh. Does not include the initial market order.
useScaledOrders
| Attribute | Value |
|---|---|
| Type | bool |
| Required | no |
| Default | false |
Enable scaled-orders ladder mode. Mutually exclusive with useDca — pick one.
scaledUpperPrice
| Attribute | Value |
|---|---|
| Type | decimal |
| Required | conditional (when useScaledOrders=true) |
| Default | 0 |
| TV placeholder compatible | yes |
Upper price bound of the ladder.
scaledLowerPrice
| Attribute | Value |
|---|---|
| Type | decimal |
| Required | conditional (when useScaledOrders=true) |
| Default | 0 |
| TV placeholder compatible | yes |
Lower price bound of the ladder.
scaledOrderNumbers
| Attribute | Value |
|---|---|
| Type | int |
| Required | conditional (when useScaledOrders=true) |
| Default | 0 |
Number of limit orders placed across the band.
scaledOrderStyle
| Attribute | Value |
|---|---|
| Type | string |
| Required | no |
| Allowed values | "even", "bigSmall", "smallBig" |
| Default | "" (treated as "even") |
Size distribution style. See the table above.
scaledUseCurrentPrice
| Attribute | Value |
|---|---|
| Type | bool |
| Required | no |
| Default | false |
Treat current mark/last price as one bound. Whichever of scaledLowerPrice / scaledUpperPrice is 0 gets replaced.
DCA vs scaled — when to use which
| Situation | Use |
|---|---|
| Want immediate market exposure plus safety net | DCA |
| Spec'd a precise band where price is expected to roam | Scaled |
| Don't know current price, just a "% below" rule | DCA |
| Know exact support/resistance levels | Scaled |
| Multi-TP planned on the whole position | Both work; DCA is the more common pairing |
Common mistakes
- Confusing
unitssemantics.unitsis the total mesh size, not the per-leg size. WithdcaOrderCount: 4andunits: 0.05, each leg is 0.01 BTC. - Setting both
useDcaanduseScaledOrders. They're mutually exclusive. TVH picks whichever flag is processed first by the adapter — unreliable. Pick one. - DCA with
postOnly: falseagainst a fast move. The first DCA leg can fill instantly as taker if price moves through. KeeppostOnly: true(default) for DCA legs. - Scaled ladder crossing current price. A long ladder where
scaledUpperPriceis 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.