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.