Long-Only Gold DCA with Fixed-Step Safety Orders and Average-Price Take Profit
Summary
This script models a long-only dollar-cost averaging approach for tokenized gold. It opens a base position, then adds safety orders at progressively lower prices using configurable order size and price-step multipliers. The take-profit threshold is calculated from the weighted average entry price, and closing the deal resets the state so another position can begin within the selected date window.
The included configuration describes a spot-pair example with a small base order, up to three safety orders, constant percentage spacing, slightly increasing order sizes, and a take profit above average cost. It reports a one-year backtest profit figure in its comments, but does not provide enough context here to assess robustness, drawdown, trade distribution, or out-of-sample performance. There is no stop loss or trailing exit in the described setup, so averaging down can leave the strategy exposed if price falls beyond the final safety level. The Pine simulation and external bot execution may also differ in fills and order handling.
Key ideas
- The strategy starts a long deal with a base order and adds safety orders as price declines.
- Safety order levels are computed cumulatively from the base price using a configurable step multiplier.
- Order sizes can grow by a separate multiplier, affecting the average entry as the position expands.
- A take-profit exit closes the entire deal when price reaches a percentage above the calculated average entry.
- The documented setup disables stop loss and trailing exits, leaving substantial downside exposure beyond the order ladder.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.