Volatility Gate is a safety-first mechanism designed to prevent DCA from stacking orders during explosive market moves. Proper tuning ensures maximum protection while still allowing trades to execute when the market stabilizes.
๐น 1๏ธโฃ Understand the Safety Objective
The goal of maximum safety tuning is:
- Avoid stacking DCA orders during high-momentum crashes or pumps
- Reduce potential drawdowns
- Prevent margin stress or liquidation
- Ensure orders execute only when probability of recovery is higher
In other words:
Prioritize capital protection over aggressive entry timing.
๐น 2๏ธโฃ Core Parameters for Safety
The Volatility Gate has several key settings that control how aggressively it blocks DCA orders:
| Parameter | Safety Tuning Focus |
|---|---|
| explosive_threshold_pct | Lower value โ more sensitive โ blocks more orders during smaller volatility spikes |
| neutral_threshold_pct | Tight value โ requires market to stabilize further before releasing orders |
| reversal_threshold_pct | Detects early trend reversal โ prevents premature release into ongoing crash |
| required_neutral_streak | Higher value โ needs more consecutive confirmations before DCA fires |
| max_observation_minutes | Ensures extreme moves donโt trigger immediate execution |
๐น 3๏ธโฃ Recommended Maximum Safety Settings
For ultra-safe protection:
volatility_gate:
enabled: true
explosive_threshold_pct: 2.0 # Sensitive to smaller adverse momentum
neutral_threshold_pct: 0.3 # Market must nearly neutralize before release
reversal_threshold_pct: -0.3 # Only early reversal triggers release
required_neutral_streak: 3 # Wait for three consecutive neutral/reversal readings
candles_to_analyze: 20 # Use 20 1m candles for smoothed momentum
max_observation_minutes: 180 # Safety timeout extended to 3 hours
Effect:
- Almost all high-momentum moves will trigger observation
- Orders only fire after strong confirmation of stability
- Maximum drawdown risk is minimized
๐น 4๏ธโฃ Step-by-Step Tuning Logic for Safety
1๏ธโฃ Lower Explosive Threshold
- Detects smaller momentum spikes
- Prevents DCA from adding during moderate surges
- Recommended range: 1.5% โ 2.5%
2๏ธโฃ Tight Neutral Threshold
- Market must stabilize almost fully before release
- Prevents DCA from firing during short pauses in the crash
- Recommended: 0.3% โ 0.5%
3๏ธโฃ Higher Neutral Streak Requirement
- Ensures confirmation is consistent
- Prevents one or two candles from triggering order prematurely
- Recommended: 2 โ 3 consecutive neutral/reversal readings
4๏ธโฃ Longer Max Observation
- Gives extreme crashes or pumps enough time to settle
- Recommended: 120 โ 180 minutes
5๏ธโฃ Candle Analysis Window
- 15โ25 candles recommended for smoothed movement
- Smoothing prevents false positives from single spikes
๐น 5๏ธโฃ Optional Aggressive Safety Tweaks
- Increase candles_to_analyze โ smoother signal, slower execution
- Lower explosive_threshold_pct further โ blocks even moderate volatility
- Increase required_neutral_streak โ stricter confirmation
Trade-off:
Orders execute later โ fewer risk exposures, but may miss small dips.
๐น 6๏ธโฃ Monitoring and Logs for Safety
Check the following logs to ensure safety tuning is working:
| Log Message | Meaning |
|---|---|
| ๐ญ Volatility gate: HELD | Order held due to high momentum |
| ๐๏ธ DCA Observer: still volatile | Momentum still too high, streak reset |
| โ DCA Observer: RELEASING | Order firing only after confirmed stability |
| โ DCA Observer: Force-releasing | Safety timeout triggered |
Regularly review logs during live/demo trading to confirm the gate is catching explosive moves as expected.
๐น 7๏ธโฃ Safety Tuning Principles
- Prioritize protection over speed โ max safety delays execution to avoid loss stacking
- Observe longer in extreme moves โ increase max_observation_minutes if volatile periods are frequent
- Confirm stabilization with streak โ never release based on single candle pause
- Balance sensitivity and usability โ extremely low thresholds may block normal DCA opportunities, so test in demo first
๐น 8๏ธโฃ Summary
To tune Volatility Gate for maximum safety:
- Use low explosive threshold (โ2%)
- Require tight neutralization (โ0.3โ0.5%)
- Require multiple consecutive confirmations (neutral streak = 3)
- Observe longer max observation (120โ180 minutes)
- Smooth over 20+ 1m candles to avoid noise
Result:
The bot will act conservatively, avoiding โfalling knifeโ situations, reducing drawdowns, and protecting capital while still allowing controlled, well-timed DCA execution.
If you want, I can also create a visual safety tuning guide, showing how threshold levels affect DCA execution during crashes and pumps. This is very helpful for new users.