What triggers the release of a held DCA order?

A held DCA order in the Volatility Gate is released only when the system detects conditions indicating it is safe to place the order or when a safety timeout is reached. The release is based on smoothed momentum, streak confirmation, and maximum observation time.


๐Ÿ”น 1๏ธโƒฃ Release Conditions

A held DCA order can be released under three main conditions:

1. Neutral Momentum (Neutral Threshold)

  • If the adverse movement falls below neutral_threshold_pct (absolute value), the market is considered stable.
  • Each consecutive neutral reading counts toward the required_neutral_streak.
  • Once the streak is reached, the order is released.

Example:

  • Neutral threshold = 0.5%
  • Adverse movement = 0.4% โ†’ counts as 1 neutral reading
  • Required neutral streak = 2 โ†’ DCA fires after 2 consecutive polls below 0.5%

2. Trend Reversal (Reversal Threshold)

  • If the adverse movement crosses below reversal_threshold_pct, momentum has started moving back toward your trade.
  • Like neutral readings, consecutive reversal readings count toward the streak.
  • Once the streak is confirmed, the order is released at a safer price closer to the recovery low/high.

Example:

  • Reversal threshold = -0.3%
  • Smoothed adverse movement = -0.35% โ†’ triggers reversal count toward streak
  • Streak met โ†’ DCA released

3. Safety Timeout (max_observation_minutes)

  • Ensures that no DCA order is held indefinitely during prolonged volatile periods.
  • If the maximum observation time is reached, the held order is force-released at the current live price, regardless of momentum.

Example:

  • Max observation = 120 minutes
  • DCA still held after 2 hours โ†’ forced execution

๐Ÿ”น 2๏ธโƒฃ How Release Works in the Lifecycle

  1. Held DCA enters observation due to explosive movement
  2. Bot polls every 60 seconds to check smoothed momentum
  3. Neutral or reversal streak tracked
if streak >= required_neutral_streak โ†’ release DCA
else if observation_time >= max_observation_minutes โ†’ force release
  1. Order executed at live market price, not at original trigger price

๐Ÿ”น 3๏ธโƒฃ Key Benefits of Controlled Release

  1. Prevents chasing explosive moves โ†’ reduces large drawdowns
  2. Improves average entry price โ†’ DCA orders place closer to stabilized lows/highs
  3. Maintains structured, disciplined DCA execution โ†’ integrates with Volatility Gate thresholds and streaks
  4. Safety net ensures execution โ†’ no order remains stuck indefinitely

๐Ÿ”น 4๏ธโƒฃ Monitoring in Logs

Log Message Meaning
๐Ÿ”ญ Volatility Gate: HELD Order in observation
๐Ÿ‘๏ธ DCA Observer: still volatile Poll shows momentum above thresholds, streak reset
โœ… DCA Observer: RELEASING Neutral or reversal streak met โ†’ order released
โŒš DCA Observer: Force-releasing Maximum observation time reached โ†’ forced execution
๐Ÿš€ DCA Release [cooled] Order placed after trend cools
๐Ÿš€ DCA Release [timeout] Order placed due to safety timeout

๐Ÿ”น 5๏ธโƒฃ Summary

A held DCA order is released when momentum has cooled or reversed, confirmed by consecutive neutral or reversal readings (required_neutral_streak), or when safety timeout is reached.

This multi-layered approach ensures DCA execution is safe, strategic, and opportunistic, avoiding chasing fast-moving markets while still guaranteeing eventual placement.

๐Ÿ“Ž Related Topics