How does explosive_threshold_pct determine when DCA is held?

The explosive_threshold_pct is the primary sensitivity parameter of the Volatility Gate. It decides whether a DCA order should be executed immediately or held for observation when the price moves sharply against your position.

In simple terms:

It defines what level of adverse momentum is considered โ€œtoo explosiveโ€ to safely place a DCA order.


๐Ÿ”น 1๏ธโƒฃ What It Measures

explosive_threshold_pct is applied to the smoothed momentum calculation:

  1. Volatility Gate analyzes recent 1-minute candles (default: 20 candles)
  2. Calculates the average movement in the first half vs the second half plus the live price
  3. Computes smoothed adverse movement:
smoothed_movement = ((second_half_avg - first_half_avg) / first_half_avg) ร— 100
  • Long trades: adverse movement = -smoothed_movement (falling price is bad)
  • Short trades: adverse movement = +smoothed_movement (rising price is bad)

  • Compare the absolute value of smoothed movement against explosive_threshold_pct.


๐Ÿ”น 2๏ธโƒฃ How DCA Holding Works

Condition Outcome
smoothed_movement < explosive_threshold_pct Market considered stable โ†’ DCA executes immediately
smoothed_movement โ‰ฅ explosive_threshold_pct Market considered explosive โ†’ DCA is HELD in observation
  • The higher the threshold, the fewer orders are held โ€” only extreme moves trigger a hold.
  • The lower the threshold, the more sensitive the system is โ€” even moderate momentum spikes can pause DCA orders.

๐Ÿ”น 3๏ธโƒฃ Example Scenarios

Scenario 1 โ€” Moderate Pullback

  • DCA trigger hit: -7% from entry
  • Smoothed adverse movement: -2%
  • explosive_threshold_pct: 3%

Result:

  • Movement is below threshold โ†’ DCA executes immediately

Scenario 2 โ€” Rapid Flash Crash

  • DCA trigger hit: -7% from entry
  • Smoothed adverse movement: -5%
  • explosive_threshold_pct: 3%

Result:

  • Movement exceeds threshold โ†’ DCA HELD
  • Order enters observation until momentum cools or trend reverses

๐Ÿ”น 4๏ธโƒฃ Safety Principle

explosive_threshold_pct acts as the gatekeeper:

  • It filters normal market noise from dangerous, high-momentum moves
  • Prevents stacking multiple DCA orders into a falling knife
  • Works in tandem with neutral_threshold_pct and required_neutral_streak to release orders safely

๐Ÿ”น 5๏ธโƒฃ Recommended Tuning Guidance

Strategy Type Suggested Range Notes
Maximum safety 1.5 โ€“ 2.5% Blocks even moderate momentum spikes, ideal for volatile altcoins
Balanced 2.5 โ€“ 3.5% Default for most BTC/ETH or mid-cap symbols
Aggressive 4 โ€“ 5% Only blocks extreme, rare events; DCA fires faster in general

Remember: Lower threshold โ†’ more held orders โ†’ slower DCA execution โ†’ higher protection


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

Check these messages to confirm behavior:

Log Message Meaning
๐Ÿ”ญ Volatility gate: HELD Adverse movement โ‰ฅ explosive_threshold_pct, order held
โœ… Volatility gate: CLEAR Adverse movement < explosive_threshold_pct, order can fire
๐Ÿ‘๏ธ DCA Observer: still volatile Observed order waiting for neutral/reversal confirmation

These logs help verify that the threshold is appropriately preventing dangerous entries without blocking normal opportunities.


๐Ÿ”น 7๏ธโƒฃ Key Takeaways

  • explosive_threshold_pct determines when the market is โ€œtoo hotโ€ to enter
  • Works on smoothed momentum, not instantaneous price spikes
  • Directly controls DCA safety during crashes, pumps, or fast moves
  • Tuning this correctly is the first step for maximum protection against falling knives

If you want, I can also create a graphical guide showing DCA trigger vs smoothed momentum vs explosive_threshold_pct, which visually explains when orders are held vs fired. This is highly effective for understanding gate behavior.

๐Ÿ“Ž Related Topics