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:
MinBalancethreshold is triggeredMaxBalancetarget 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
MinBalanceprotects against excessive drawdown.MaxBalancelocks 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.