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:
- Volatility Gate analyzes recent 1-minute candles (default: 20 candles)
- Calculates the average movement in the first half vs the second half plus the live price
- 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_pctdetermines 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.