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.