What are MinBalance and MaxBalance?


MinBalance & MaxBalance โ€“ Account-Level Safety Controls

MinBalance and MaxBalance are account-level protection mechanisms that automatically stop the bot from placing new trades when your balance moves outside defined thresholds.

They act as hard balance guardrails for live trading.

โš ๏ธ These settings apply to Live Trading only.


๐Ÿ“ Configuration Location

# --------------------------------------------------------------------------
# Balance Safety Limits (Live Trading Only)
# --------------------------------------------------------------------------
# Prevents trading outside defined account balance thresholds

MinBalance: 0
MaxBalance: 0

Setting either value to 0 disables that specific limit.


๐ŸŽฏ Purpose of These Controls

These safety limits allow you to:

  • Protect capital during drawdowns
  • Lock in profits at milestone targets
  • Pause trading automatically for review
  • Automate balance-based trading control

They ensure your bot operates only within a predefined capital range.


1๏ธโƒฃ MinBalance โ€“ Downside Protection

MinBalance: 800

When account balance falls to or below this value:

  • New trade entries are blocked
  • Open trades continue to be managed normally
  • No additional exposure is created
  • Notification is sent (if enabled)

๐Ÿ”Ž Example Scenario

Starting Balance: 1000 USDT
MinBalance: 800 USDT

If losses reduce balance to:

800 USDT

The bot immediately:

  • Stops opening new trades
  • Waits for manual review or balance recovery
  • Prevents further capital erosion

๐Ÿง  Why This Matters

This setting is especially useful when:

  • Testing high leverage strategies
  • Running aggressive Martingale sequences
  • Evaluating new configurations
  • You want psychological safety thresholds

It acts as a drawdown circuit breaker.


2๏ธโƒฃ MaxBalance โ€“ Profit Lock / Target Achievement

MaxBalance: 5000

When account balance reaches or exceeds this value:

  • New trade entries are blocked
  • Trading activity pauses automatically
  • Notification is sent
  • You can withdraw or reassess strategy

๐Ÿ”Ž Example Scenario

Starting Balance: 1000 USDT
MaxBalance: 5000 USDT

When the balance grows to:

5000 USDT

The bot:

  • Stops placing new trades
  • Preserves the achieved milestone
  • Awaits manual action

๐Ÿง  Strategic Advantage

This enables:

  • Milestone-based automation
  • Hands-off compounding cycles
  • Profit locking without manual monitoring
  • Goal-driven capital management

๐Ÿ”” Notifications

If configured in notifications.yaml, the system can send:

  • Discord alerts
  • Telegram alerts

You are notified when:

  • MinBalance threshold is triggered
  • MaxBalance target is reached

โš™๏ธ Technical Behavior

The bot checks balance before placing each new trade.

IF Balance <= MinBalance
   OR
   Balance >= MaxBalance

THEN
   Block new trade entries

Important:

  • Open trades are NOT closed automatically
  • The bot continues monitoring markets
  • Only new entries are prevented

๐Ÿ” Safety Configuration Examples

โœ… Capital Protection Mode

MinBalance: 800
MaxBalance: 0

Stops trading if drawdown exceeds 20%.


โœ… Profit Target Mode

MinBalance: 0
MaxBalance: 5000

Stops trading after reaching a predefined milestone.


โœ… Balanced Control Mode

MinBalance: 800
MaxBalance: 5000

Bot trades only within a safe operating capital zone.


๐Ÿ“Š Conceptual Visualization


      STOP (MaxBalance)
           โ†‘
           โ”‚
      Trading Allowed Zone
           โ”‚
           โ†“
      STOP (MinBalance)

The bot operates strictly within this balance corridor.


๐Ÿš€ Advanced Strategic Integration

These limits work alongside:

  • Dynamic Trade Sizing
  • DCA Scaling
  • Money Management sequences
  • Leverage controls

Example Combined Setup

Starting Balance: 1000 USDT
DynamicAmountPercentage: 5
MinBalance: 800
MaxBalance: 5000

This creates:

  • Automatic compounding during growth
  • Automatic stop during drawdown
  • Profit milestone locking
  • Fully automated capital cycle management

๐Ÿ“Œ Final Summary

  • MinBalance protects against excessive drawdown.
  • MaxBalance locks in achieved profit milestones.
  • Both apply to live trading only.
  • They prevent new trades โ€” they do NOT close open positions.

Together, they form a capital guardrail system that transforms your bot into a goal-aware, risk-controlled automation engine.

๐Ÿ“Ž Related Topics