What is AverageMovementEmergencyClose?

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


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.

๐Ÿ“Ž Related Topics