Home  ›  SignalPipe  ›  Documentation  ›  The DCA Ladder System

The DCA Ladder System

The DCA Ladder System

DCA (Dollar-Cost Averaging) is the strategy of buying more shares of an asset as its price drops, lowering your average cost basis. SignalPipe implements a full DCA ladder system that automatically manages this process.

How the Ladder Works

Each deal starts at ladder level 1 (the base order). Every time a new buy signal fires for the same ticker while the deal is active, a safety order is placed, moving the ladder to the next level.

Ladder LevelOrder TypeWhat Happens
1Base OrderInitial buy that opens the deal
2Safety Order #1First DCA buy -- averages down entry
3Safety Order #2Second DCA buy -- averages down further
4Safety Order #3Third DCA buy
......Continues for each new buy signal

Weighted Average Entry Price

The core of the DCA system is the weighted average entry price calculation. After each safety order, the average is recalculated:

new_avg_entry = (old_total_cost + new_order_cost) / new_total_shares

Where:

  • old_total_cost = previous avg entry price previous total shares
  • new_order_cost = safety order fill price safety order shares
  • new_total_shares = previous total shares + safety order shares

Take-Profit Recalculation

Every time the average entry price changes, the take-profit target is recalculated:

new_tp_price = new_avg_entry * (1 + tp_percent / 100)

The old limit sell order on Alpaca is cancelled and a new one is placed at the updated TP price for the updated total share count.

DCA Ladder Example

Assume a 5% take-profit setting and a base order of 10 shares:

StepActionPriceSharesTotal SharesAvg EntryTP Target
1Base order$100.001010$100.00$105.00
2Safety #1$90.001525$94.00$98.70
3Safety #2$85.002247$89.26$93.72
Notice the effect of the DCA ladder:
  • After the base order, the price needs to reach $105.00 for a 5% profit
  • After safety order #1, the TP drops to $98.70 -- already below the original entry price
  • After safety order #2, the TP drops further to $93.72

The more the price drops and the more safety orders are filled, the closer the TP target moves to the current price. This dramatically increases the probability of the take-profit being reached.

Safety Order Volume Scaling

The vyn premium strategy supports a Safety Order Volume Scale setting. This multiplier increases the dollar amount of each successive safety order. For example, with a scale of 1.5x:

  • Base order: $1,000 worth of shares
  • Safety #1: $1,500 worth of shares
  • Safety #2: $2,250 worth of shares

Larger safety orders at lower prices have a greater impact on bringing down the average entry, but they also increase total capital commitment. Choose a scale that matches your risk tolerance and account size.

Race Condition Protection

When a safety order signal arrives, SignalPipe checks whether the existing take-profit order has already been filled before attempting to cancel it. If the TP was filled (meaning the position was sold), the deal is marked as completed and the safety order is not processed. This prevents placing a buy order for a position that no longer exists.

This is a static view of a single section. For full search and interactivity visit the docs app. Open interactive docs →