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