Docs Download
Home / Docs / How does explosive_threshold_pct determine when DCA is held?

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.

Ready to trade? Download MagicTradeBot free and test in paper mode before going live.