The required_neutral_streak parameter is a safety confirmation mechanism in the Volatility Gate. It defines the number of consecutive neutral or reversal readings needed before a held DCA order is released.
In essence:
It ensures the market is genuinely stabilizing or reversing, rather than pausing briefly during an ongoing volatile move.
🔹 1️⃣ Purpose of Required Neutral Streak
When a DCA order is held due to explosive movement:
- The market can fluctuate rapidly
- A single candle or poll cycle might momentarily appear neutral, even if the trend is still adverse
- Releasing a DCA based on a single neutral reading could lead to catching a falling knife
required_neutral_streak prevents this by requiring confirmation over multiple polling cycles.
🔹 2️⃣ How It Works
- The bot polls the smoothed kline movement every 60 seconds
- Checks if adverse movement is below
neutral_threshold_pctor meetsreversal_threshold_pct - Each consecutive poll meeting this condition counts as 1 streak
- Only when the streak reaches
required_neutral_streakis the DCA order released
Example:
neutral_threshold_pct = 0.5%
reversal_threshold_pct = -0.3%
required_neutral_streak = 2
Poll 1: adverse = 0.4% → counts as neutral (streak = 1)
Poll 2: adverse = 0.2% → counts as neutral (streak = 2)
→ DCA released
- If any poll shows movement above thresholds (still volatile), the streak resets
- This ensures only consistent stabilization triggers order release
🔹 3️⃣ Key Benefits
- Prevents premature DCA execution: Avoids placing orders during brief pauses in a continuing crash/pump
- Reduces risk of chasing volatile moves: Only releases orders when momentum has clearly cooled
- Enhances consistency: Combines with
neutral_threshold_pctandreversal_threshold_pctto form a robust multi-step confirmation - Customizable safety level: Higher streak → more confirmation, slower release; lower streak → quicker release, slightly higher risk
🔹 4️⃣ Recommended Values
| Trading Style | Recommended required_neutral_streak |
Notes |
|---|---|---|
| Maximum safety | 3–4 | Ensures strong confirmation; ideal for very volatile altcoins |
| Balanced | 2 (default) | Standard for BTC/ETH or mid-cap symbols |
| Aggressive | 1 | Quick DCA release for low-volatility assets or fast-response strategies |
Tip: Combine with
neutral_threshold_pcttuning — a higher streak with a strict neutral threshold provides maximum protection.
🔹 5️⃣ Monitoring in Logs
Check these messages to see streak behavior:
| Log Message | Meaning |
|---|---|
| 👁️ DCA Observer: still volatile | Adverse movement above neutral/reversal threshold, streak reset |
| ✅ DCA Observer: RELEASING | Required neutral/reversal streak reached, DCA fires |
| 🔭 Volatility Gate: HELD | Order is in observation, streak counting in progress |
🔹 6️⃣ Summary
required_neutral_streak is a confirmation filter that ensures DCA orders are released only after consistent stabilization or early reversal.
By combining this streak with smoothed kline movement and threshold settings, the Volatility Gate provides institutional-grade protection, minimizing the risk of adding to positions during ongoing momentum-driven market moves.