Skip to content

DCA and execution

DCA bot maximum deal age: define the exit clock

A time limit starts a closing process; it does not prove exposure ended. Use a policy worksheet and a 48-hour example to separate the deadline from the final fill.

A glass hourglass with ivory sand in its lower chamber stands beside stacked ivory discs ending at an upright lime slab on a black surface.
Illustration for dca and execution; examples in this article are educational.

A DCA bot maximum deal age is a time-based rule that starts an exit or review when a deal reaches a defined age. Specify the starting event, clock, deadline and action before entry. A deadline can trigger closing, but it cannot guarantee that every unit is sold by that instant; order handling, liquidity and outages can leave exposure afterward.

A position can remain open long after its original trading premise expires. Averaging changes its quantity and cost, but does not by itself renew that premise. The useful question is therefore specific: what must happen when this deal reaches its time boundary, even if its take-profit target has not traded?

Decide whether the deadline means review or exit

These are different policies:

  • Review threshold: stop adding exposure and ask whether to retain or close the holding. A person may approve continued holding.
  • Mandatory exit trigger: stop adding exposure and begin closing the remaining quantity regardless of whether it is profitable.
  • Conditional exit: try to close only if an additional condition, such as minimum net profit, also holds.

The third policy may leave a losing deal open indefinitely. Calling it a maximum holding period hides the exception. Write “review after 48 hours” or “exit after 48 hours if net profit is positive” when that is the actual instruction. The illustrative 48-hour interval here is not a recommended setting.

Time limits are a real execution concept. Hummingbot's Position Executor documentation describes a time barrier alongside take profit and stop loss. That documents Hummingbot's design; it does not establish an equivalent control in KLINEO or a universally suitable duration.

An age rule also differs from DCA drawdown duration. Drawdown duration measures time below an equity peak. A deal can reach its age limit while profitable, and an account can recover its peak while that deal remains open.

Put the starting event and boundary in writing

For this article's proposed policy, start the clock at the first executed entry fill assigned to the deal. A submitted but unfilled order has a separate entry-waiting deadline. A partial first fill starts exposure and therefore starts this clock.

Use elapsed UTC time:

deadline = first entry fill timestamp + allowed duration

age = current timestamp − first entry fill timestamp

An age-triggered exit becomes due when current timestamp >= deadline. Later safety fills and partial exits do not reset the deadline. Under this policy, a new deal starts a new clock only after the previous deal's orders and exposure have been reconciled.

This is a declared convention, not an industry default. For example, the reviewed Hummingbot DCA Executor implementation calculates its end time from a configuration timestamp plus a time limit, and treats equality as expired. Read what creates that timestamp before equating an implementation's limit with first-fill age.

An elapsed 48 hours is also different from 48 candles. An hourly candle evaluator can first notice a deadline later than the deadline itself. Record the evaluation interval and actual detection time; do not silently label that delay as an on-time exit.

A worksheet for one explicit policy

Fill these fields before comparing strategy results or relying on automation. The example describes an unleveraged spot deal with one owner.

Policy fieldHypothetical choiceWhat this prevents
Start eventFirst confirmed entry fillCounting an unfilled order as held inventory
Allowed age48 elapsed hoursAmbiguous calendar-day boundaries
Due boundaryAt or after the saved UTC deadlineA one-cycle equality gap
Paused timeContinues to countA pause extending the premise invisibly
Additional fillsDo not reset ageRepeated buys postponing closure forever
Deadline actionFreeze additions; reconcile and close remainderA review notice being mistaken for an exit
Profit conditionNone for this exampleA hidden exception for losing deals
Completion evidenceFinal order states and reconciled remaining quantityA request receipt being treated as flat exposure

A soft bot pause is not necessarily a clock pause. The pause-versus-close guide explains the inventory consequences. If a strategy deliberately suspends its age clock, save the suspended intervals and name the resulting measure “active running time.” It is no longer elapsed holding time.

Follow a deal across its deadline

Consider this invented timeline. Prices and fills are constructed for arithmetic, not estimates of typical execution. Fees, spread costs beyond the shown fill prices and taxes are excluded; the quote unit is assumed stable. All timestamps are UTC.

TimeEventQuantity still heldDeadline consequence
Oct 20, 09:00:00Buy 2 units at $1002Save Oct 22, 09:00:00 deadline
Oct 21, 09:00:00Buy 3 units at $905Original deadline stays
Oct 22, 08:00:00Final 1-unit safety fill at $856One hour remains; no extension
Oct 22, 09:00:00Exit is due; additions disabled and cancellations requested6Closing begins; deal is not yet flat
Oct 22, 09:00:01Existing take-profit order fills 1 unit at $93 before cancellation is final5Reconcile the partial exit
Oct 22, 09:00:07Closing sale fills the remaining 5 at $920Exposure ends seven seconds after deadline

Total entry cost is 2 × 100 + 3 × 90 + 1 × 85 = $555. Gross exit proceeds are 1 × 93 + 5 × 92 = $553, leaving a $2 loss before fees. The take-profit label on the first sale does not make the whole deal profitable.

The trigger age is 48 hours; actual exposure age is 48 hours and seven seconds. Both belong in the record. The partial take-profit fill guide explains how to allocate cost and track the remaining quantity after the first exit.

The closing instruction must use the reconciled five units, not the stale six. Bybit's cancel-order documentation says a successful acknowledgment accepts an asynchronous request and instructs clients to confirm status through its WebSocket. Cancellation does not undo a fill that already occurred.

Keep the rule intact through interruptions

A restart should recover the original deadline rather than create a fresh 48-hour allowance. Persist the deal identity, first-fill evidence, policy revision and pending close intent. If ownership is uncertain, establish it before adopting or canceling orders; the startup order-adoption guide covers that boundary.

If the system reconnects after the deadline, record the missed interval and reconcile orders, fills and inventory before resuming the due action. Do not report a retroactive fill at the deadline's quoted price. A timer that was offline cannot prove what could have executed then.

Even an accepted market close can leave a remainder. Bybit's order-creation documentation describes market orders being converted into IOC limit orders with slippage protection and possible cancellation when liquidity is insufficient. Those are venue rules, not a promise of instant liquidation.

Define who handles a rejected close, a partial close or residual quantity below a trading minimum. Keep the exception visible with the unsold amount and next action. For futures, verify contract units, position side and applicable reduce-only behavior separately; this spot worksheet does not model margin, funding or liquidation.

Test the deadline rather than the label

Compare the proposed age policy with the same strategy without it, using fixed evaluation windows and costs. Include unfinished deals. A time exit can release capital sooner while realizing losses or missing a later recovery; shorter holding time alone does not establish a better strategy.

Exercise exact equality, a partial first fill, a safety fill just before expiry, restart after expiry and a closing order that partly fills. For each case, inspect the saved deadline, new-entry submissions after it, actual remaining quantity and final fill time. The reusable output is a deadline record with evidence, not just a “timed out” status.

Prepared with AI assistance under the editorial policy, this article combines primary execution documentation with an original policy worksheet and hypothetical timeline. No KLINEO maximum-deal-age feature, live strategy result or safe universal holding period was verified.

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.