AverageMovementEmergencyClose defines the opposite market movement percentage that triggers an emergency close of open positions.
It is a defensive setting designed to protect your trades when the market suddenly reverses sharply against your position.
Example:
AverageMovementEmergencyClose: 0.6
This means:
- If a crash is detected → long positions may be closed.
- If a pump is detected → short positions may be closed.
- Only when the opposite movement reaches the defined percentage.
🛡️ What Problem Does It Solve?
Crypto markets often:
- Pump aggressively
- Reverse suddenly
- Crash after breakout failures
Without protection, a fast reversal can:
- Erase unrealized profits
- Deepen drawdowns
- Increase liquidation risk (especially with leverage)
This setting ensures your bot reacts quickly when volatility turns against your direction.
⚙️ How It Works Internally
The emergency close logic follows a structured process:
Step 1 — Opposite Volatility Detected
If the emergency threshold is met (for example, a crash event while you hold longs):
All running Long positions are marked internally with:
emergency_close = true
If a pump event occurs:
- All running Short positions receive the same flag.
No immediate closing happens at this stage — only the flag is applied.
Step 2 — Decision Engine Validation
The Decision Making Brain then evaluates each flagged trade:
The trade will close if:
- The trade age is older than the minimum required hold time OR
- The emergency close override option is enabled (allowing instant close)
This ensures:
- No premature exits due to noise
- Smart filtering before forced closing
- Controlled execution instead of panic selling
📉 Example Scenario
You are holding a Long position.
Market conditions:
- Sudden crash detected
- Average downward movement exceeds 0.6%
- Your long trade is flagged
If emergency close conditions are satisfied:
→ The trade closes automatically → Capital is protected → Drawdown is reduced
🎯 Why Recommended Value Is Half of Alert Threshold
It is recommended that:
AverageMovementEmergencyClose ≈ 50% of AverageMovementPercent
Example:
AverageMovementPercent: 1.2
AverageMovementEmergencyClose: 0.6
Reason:
- Alerts detect larger volatility
- Emergency close reacts earlier
- Trades exit near the early phase of reversals
- Losses are minimized before full crash expansion
This creates a proactive protection system instead of reactive damage control.
📊 Strategic Impact
This setting is especially important when:
- Using leverage
- Running DCA strategies
- Trading volatile altcoins
- Operating unattended
It dramatically reduces the risk of:
- Deep drawdowns
- Emotional decision delays
- Catastrophic reversals
🚀 Summary
AverageMovementEmergencyClose defines the opposite movement percentage that triggers emergency position closures.
It:
- Flags trades when market reverses sharply
- Works with the Decision Making Brain for safe execution
- Protects against sudden pumps or crashes
- Should typically be set at half the alert threshold
It is your automated emergency brake during extreme volatility.