Appearance

Personalize your experience

Mode
Accent Color
Direction
DCA Bot — Overview

DCA Bot — Overview

DCA

Dollar-cost averaging in cycles: enter, average in on adverse moves, exit the whole position on one take-profit, repeat.

One cycle, end to end

  1. 1
    1 — Base order
    A market order opens the cycle at the current price. That price is the base every is measured from.
  2. 2
    2 — Safety orders
    Limit orders rest against the move (below for long, above for short). Only the configured number of active safety orders sit on the book at once; when one , the next is placed.
  3. 3
    3 — Average + take-profit
    Every fill updates the average entry. The engine cancels and re-places ONE reduce-only take-profit order for the entire position.
  4. 4
    4 — Close
    When the take-profit (or the fires), resting safety orders are cancelled and the cycle’s profit is booked.
  5. 5
    5 — Next cycle
    After the cooldown — and if is not reached — a new opens at the then-current price. Signal waits for the next signal instead.

What runs it

The bot runs server-side on the C++ DCA engine — the same family as the . Orders go out through the shared broker adapters (Zerodha, Shoonya, AliceBlue, Flattrade, Delta Exchange), every order carries a that encodes the , cycle and step, and the auditor reconciles the local book against the broker's orders, and positions.

See also

Related articles

  • DCA Stop Loss

    Automation / Predefined Strategies / DCA Bot

    When armed, the engine checks every tick: once price moves the stop distance against the cycle's average entry , it cancels the resting safety orders and…

  • DCA Take Profit

    Automation / Predefined Strategies / DCA Bot

    Target = average × (1 ± TP). Moves toward the market as safety orders fill, so a small bounce closes the cycle.

  • DCA Capital & Leverage

    Automation / Predefined Strategies / DCA Bot

    Before placing a safety order the engine checks committed notional + order notional ≤ max capital × leverage and refuses the order if not. The base order is…

  • DCA Cycles

    Automation / Predefined Strategies / DCA Bot

    Closed cycles (take-profit or stop) before the bot stops opening new ones. 0 = unlimited. On a neutral bot both sides count.

  • DCA Direction — Long, Short, Neutral

    Automation / Predefined Strategies / DCA Bot

    Direction Base order Safety orders Take-profit Long Buy at market Buy limits below the base One sell above the average entry Short Sell at market Sell…

  • DCA Modes

    Automation / Predefined Strategies / DCA Bot

    How safety-order sizes grow with depth — and how cycles open.

  • DCA Orders

    Automation / Predefined Strategies / DCA Bot

    Market order that opens each cycle. Its fill price is the cycle’s base price.

  • DCA Particulars

    Automation / Predefined Strategies / DCA Bot

    The venue and instrument. Sizes are in that instrument’s lots / contracts / shares.

  • DCA Safety Order Spacing

    Automation / Predefined Strategies / DCA Bot

    Spacing Deviation of order k Example (1%, scale 1.2) Linear d · k 1%, 2%, 3%, 4% Geometric d · (1 + r + r² + … + r^(k−1)) 1%, 2.2%, 3.64%, 5.37%

Browse all knowledge base articles →