Money Management Configuration User Guide


πŸ“– Introduction

Money management strategies automatically adjust your position sizes based on your trading history (consecutive wins or losses). This helps you:

  • Recover losses faster during drawdowns
  • Scale up winning positions during hot streaks
  • Control risk with mathematical precision
  • Optimize capital deployment
  • Manage portfolio-wide risk across all symbols NEW

⚠️ Important Note

Money management amplifies both gains and losses. Always start conservative and test thoroughly in demo mode for at least 30 days before going live.


βš™οΈ How It Works

Basic Concept

The system tracks your completed trades and calculates the current position in your sequence by walking through trade history. Each win or loss moves you forward or backward in the sequence based on your configuration.

Base Position Size Γ— Multiplier from Sequence = Final Position Size

πŸ”„ Position Calculation

The bot processes your last 20 completed trades (for performance) and determines your current position in the sequence. When you reach the end of the sequence and move forward again, it wraps around to the beginning.

Example Flow (Mode 1 - Forward on Win)

Sequence: [1, 1, 2, 3, 5, 8, 13, 21]
Mode: 1              # Move forward on win
MoveBackSteps: 2     # Move back 2 steps on loss
Trade Result Movement Position Multiplier Size ($100 base)
Start - 0 1x $100
WIN Forward +1 1 1x $100
WIN Forward +1 2 2x $200
WIN Forward +1 3 3x $300
LOSS Backward -2 1 1x $100
WIN Forward +1 2 2x $200

πŸ”§ Configuration Basics

Complete Configuration Structure ENHANCED

# In tradesettings.yaml or your configuration file

MoneyManagementStrategySettings:
  Sequence: [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]  # Multiplier sequence
  Mode: 1                                        # 0 or 1
  SkipSymbol: false                             # true/false (NEW)
  MoveBackSteps: 2                              # 0, 1, 2, or N (NEW)

Parameter Details

1. Sequence

  • Format: Array of positive integers: [1, 2, 3, 4, 5]
  • Disable: Empty array [] disables money management
  • Validation: Must contain only positive values (no zeros or negatives)
  • Wrap-around: When reaching the end, moving forward wraps to position 0
  • Performance: System only loads last 20 trades for calculation

2. Mode

Mode Forward Movement Backward Movement Use Case
0 On LOSS On WIN Recovery-focused (Martingale style)
1 On WIN On LOSS Momentum-focused (Anti-Martingale)

3. SkipSymbol NEW

  • false (default): Track position separately for each symbol
  • true: Track position globally across all symbols using the most recent closed trade
# Per-Symbol Tracking (SkipSymbol: false)
BTC/USD: Position calculated from BTC trades only
ETH/USD: Position calculated from ETH trades only
SOL/USD: Position calculated from SOL trades only

# Global Tracking (SkipSymbol: true)
All Symbols: Position calculated from most recent trade (any symbol)
- Trade BTC WIN  β†’ position moves for ALL symbols
- Trade ETH LOSS β†’ position moves for ALL symbols
- Trade SOL WIN  β†’ position moves for ALL symbols

4. MoveBackSteps NEW

Controls how many steps to move backward when the losing condition is met:

Value Behavior Best For
0 RESET to position 0 Martingale, aggressive recovery
1 Move back 1 step (default) Conservative, balanced approach
2 Move back 2 steps Classic Fibonacci style
N Move back N steps Custom strategies

πŸ’‘ Movement Rules

  • Forward: Always moves +1 step (fixed)
  • Backward: Configurable via MoveBackSteps
  • Wrap-around: Only applies to forward movement (reaching sequence end)
  • Floor: Backward movement stops at position 0 (never negative)

πŸ†• New Features & Enhancements

1. Global Portfolio Risk Management (SkipSymbol)

✨ Use Case: Portfolio-Wide Position Sizing

When trading multiple symbols simultaneously, you can now manage risk across your entire portfolio rather than per symbol. This prevents over-leveraging when all symbols are performing similarly.

MoneyManagementStrategySettings:
  Sequence: [1, 1, 2, 3, 5, 8]
  Mode: 1
  SkipSymbol: true     # Apply globally
  MoveBackSteps: 2

# Scenario:
# 09:00 - BTC WIN  β†’ Position 0β†’1 (applies to ALL symbols)
# 09:15 - ETH WIN  β†’ Position 1β†’2 (applies to ALL symbols)
# 09:30 - SOL LOSS β†’ Position 2β†’0 (applies to ALL symbols, back 2 steps)
# 09:45 - BTC WIN  β†’ Position 0β†’1 (applies to ALL symbols)

2. Customizable Backward Movement (MoveBackSteps)

Different strategies require different backward movement patterns:

Strategy Type MoveBackSteps Reason
Classic Martingale 0 Complete reset after win
D'Alembert 1 Gradual progression/regression
Fibonacci 2 Natural Fibonacci retrace pattern
Custom Aggressive 3+ Rapid position reduction

3. Sequence Wrap-Around

When your winning or losing streak exceeds the sequence length, the system automatically wraps to the beginning instead of getting stuck at the maximum multiplier.

Sequence: [1, 2, 3, 5, 8]  # 5 positions (0-4)

Position 4 (8x) β†’ WIN β†’ Position 0 (1x)  βœ… Wraps around!
# Not: Position 4 (8x) β†’ WIN β†’ Position 4 (8x)  ❌ Old behavior

⚠️ Wrap-Around Implications

Wrap-around forces periodic resets to base multiplier, which acts as automatic risk management. However, if you hit the sequence end frequently, consider extending your sequence or adjusting your strategy.

4. Performance Optimization

  • Limited history loading: Only last 20 trades loaded from database
  • Efficient calculation: Position determined in single pass through history
  • Reduced database queries: Uses ORDER BY DESC + LIMIT for optimal performance
  • No memory bloat: Long-running bots won't accumulate hundreds of trades in memory

🎯 Mode Selection Guide

Mode 0: Recovery Strategy (Recommended for Most)

Movement Pattern:

LOSS β†’ Move forward in sequence (increase position size)
WIN  β†’ Move backward in sequence (decrease position size)

When to Use:

  • Win rate between 40–60%
  • Focused on recovering from drawdowns
  • Risk-averse trading style
  • Mean-reversion strategies
  • Grid trading or ranging markets

Example with MoveBackSteps: 1

Sequence: [1, 1, 2, 3, 5, 8, 13]
Mode: 0
MoveBackSteps: 1

Trade Flow:
Position 0 β†’ LOSS β†’ Position 1 (1x β†’ 1x)
Position 1 β†’ LOSS β†’ Position 2 (1x β†’ 2x)
Position 2 β†’ LOSS β†’ Position 3 (2x β†’ 3x)
Position 3 β†’ WIN  β†’ Position 2 (back 1: 3x β†’ 2x)
Position 2 β†’ WIN  β†’ Position 1 (back 1: 2x β†’ 1x)
Position 1 β†’ WIN  β†’ Position 0 (back 1: 1x β†’ 1x)

Mode 1: Momentum Strategy

Movement Pattern:

WIN  β†’ Move forward in sequence (increase position size)
LOSS β†’ Move backward in sequence (decrease position size)

When to Use:

  • Win rate above 60%
  • Trend-following strategies
  • Want to maximize winning streaks
  • Strong trending markets
  • Breakout trading

Example with MoveBackSteps: 2

Sequence: [1, 2, 4, 8, 16, 32]
Mode: 1
MoveBackSteps: 2

Trade Flow:
Position 0 β†’ WIN  β†’ Position 1 (1x β†’ 2x)
Position 1 β†’ WIN  β†’ Position 2 (2x β†’ 4x)
Position 2 β†’ WIN  β†’ Position 3 (4x β†’ 8x)
Position 3 β†’ LOSS β†’ Position 1 (back 2: 8x β†’ 2x)
Position 1 β†’ WIN  β†’ Position 2 (2x β†’ 4x)

πŸš€ Advanced Strategy Examples

1. Classic Fibonacci (Mode 1, MoveBackSteps: 2)

MoneyManagementStrategySettings:
  Sequence: [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
  Mode: 1                    # Forward on win
  SkipSymbol: false          # Per-symbol tracking
  MoveBackSteps: 2           # Classic Fibonacci retrace

How It Works:

  • Each win moves forward +1 in Fibonacci sequence
  • Each loss moves back -2 positions (Fibonacci retrace)
  • Natural mathematical progression/regression
  • Wraps to start if reaching position 9 (55x)

Best For: Trend-following with good win rate (55%+)

2. Pure Martingale (Mode 0, MoveBackSteps: 0)

MoneyManagementStrategySettings:
  Sequence: [1, 2, 4, 8, 16, 32, 64, 128]
  Mode: 0                    # Forward on loss
  SkipSymbol: false
  MoveBackSteps: 0           # Complete reset on win

How It Works:

  • Each loss doubles position size
  • Single win resets to base size (position 0)
  • Aggressive recovery strategy
  • High risk, requires substantial capital

Best For: High win rate (65%+), ranging markets, grid trading

⚠️ Martingale Risk Warning

8 consecutive losses at 128x multiplier requires massive capital. Never use without proper risk management and stop-loss limits.

3. Anti-Martingale / Paroli (Mode 1, MoveBackSteps: 0)

MoneyManagementStrategySettings:
  Sequence: [1, 2, 4, 8, 16]
  Mode: 1                    # Forward on win
  SkipSymbol: false
  MoveBackSteps: 0           # Complete reset on loss

How It Works:

  • Each win doubles position size
  • Single loss resets to base size
  • Rides winning streaks aggressively
  • Protects capital during losing streaks

Best For: Conservative traders, trending markets, momentum trading

4. Portfolio-Wide Fibonacci (SkipSymbol: true)

MoneyManagementStrategySettings:
  Sequence: [1, 1, 2, 3, 5, 8, 13]
  Mode: 1
  SkipSymbol: true           # Global position tracking
  MoveBackSteps: 2

How It Works:

  • Tracks ONE position across ALL symbols
  • Most recent trade (any symbol) determines position
  • Prevents over-leveraging across portfolio
  • Useful for correlated assets (crypto pairs)

Scenario Example:

09:00 BTC WIN  β†’ Global position: 0β†’1 (all symbols now at 1x)
09:15 ETH WIN  β†’ Global position: 1β†’2 (all symbols now at 2x)
09:30 SOL WIN  β†’ Global position: 2β†’3 (all symbols now at 3x)
09:45 BTC LOSS β†’ Global position: 3β†’1 (all symbols back to 1x)

Next BTC trade uses 1x multiplier
Next ETH trade uses 1x multiplier  
Next SOL trade uses 1x multiplier

5. D'Alembert System (Mode 0, MoveBackSteps: 1)

MoneyManagementStrategySettings:
  Sequence: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  Mode: 0                    # Forward on loss
  SkipSymbol: false
  MoveBackSteps: 1           # Slow retreat

How It Works:

  • Linear progression (+1 on loss)
  • Linear regression (-1 on win)
  • Balanced, moderate risk approach
  • Well-suited for near 50% win rate

6. Aggressive Stepped Fibonacci (MoveBackSteps: 3)

MoneyManagementStrategySettings:
  Sequence: [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
  Mode: 1
  SkipSymbol: false
  MoveBackSteps: 3           # Aggressive retreat

How It Works:

  • Standard Fibonacci forward movement
  • Rapid 3-step backward on loss
  • Quickly reduces risk after losses
  • More conservative than classic Fibonacci

7. Hybrid Multi-Symbol Strategy

# Configuration for correlated pairs
MoneyManagementStrategySettings:
  Sequence: [1, 2, 3, 5, 7, 10, 12, 15]
  Mode: 1
  SkipSymbol: true           # Track globally
  MoveBackSteps: 2

# Use when trading:
# - BTC/USD, ETH/USD, SOL/USD (all crypto)
# - EUR/USD, GBP/USD, AUD/USD (all forex majors)
# - Gold, Silver, Platinum (all precious metals)

πŸ“Š Trading Style Configurations

Day Trading / Scalping

MoneyManagementStrategySettings:
  Sequence: [1, 1, 2, 2, 3, 3, 4, 5]
  Mode: 0
  SkipSymbol: false
  MoveBackSteps: 1

# Capital: $5,000+
# Base size: 4% ($200)
# Frequency: 10-50 trades/day

Swing Trading

MoneyManagementStrategySettings:
  Sequence: [1, 1, 2, 3, 5, 8, 13, 21]
  Mode: 0
  SkipSymbol: false
  MoveBackSteps: 2           # Classic Fibonacci if Mode 1

# Capital: $10,000+
# Base size: 3% ($300)
# Frequency: 2-10 trades/week

Position Trading

MoneyManagementStrategySettings:
  Sequence: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  Mode: 0
  SkipSymbol: false
  MoveBackSteps: 1

# Capital: $50,000+
# Base size: 2% ($1,000)
# Frequency: 1-5 trades/month

Grid Trading

MoneyManagementStrategySettings:
  Sequence: [1, 2, 4, 6, 8, 10, 10, 10, 10, 10]
  Mode: 0
  SkipSymbol: false
  MoveBackSteps: 0           # Reset on win

# Capital: $20,000+
# Multiple simultaneous positions
# Frequency: Very high

Portfolio Management (Multi-Symbol)

MoneyManagementStrategySettings:
  Sequence: [1, 1, 2, 3, 5, 8]
  Mode: 1
  SkipSymbol: true           # Global tracking
  MoveBackSteps: 2

# Capital: $25,000+
# Trading: BTC, ETH, SOL, etc.
# Portfolio-wide risk control

πŸ’Ό Practical Examples

Example 1: Swing Trader with Fibonacci

Profile:

  • Capital: $10,000
  • Base: $300 (3%)
  • Win rate: 55%
  • Style: Swing trading BTC/USD only
MoneyManagementStrategySettings:
  Sequence: [1, 1, 2, 3, 5, 8, 13]
  Mode: 1
  SkipSymbol: false
  MoveBackSteps: 2

Trade Sequence:

Trade Result Position Multiplier Size P/L
1 WIN 0β†’1 1x $300 +$300
2 WIN 1β†’2 1x $300 +$300
3 WIN 2β†’3 2x $600 +$600
4 LOSS 3β†’1 3x $900 -$900
5 WIN 1β†’2 1x $300 +$300

Net Result: +$600 (4 wins, 1 loss = 80% win rate in sample)

Example 2: Multi-Symbol Trader

Profile:

  • Capital: $25,000
  • Base: $500 (2%)
  • Trading: BTC, ETH, SOL
  • Win rate: 58%
MoneyManagementStrategySettings:
  Sequence: [1, 1, 2, 3, 5, 8]
  Mode: 1
  SkipSymbol: true           # Global position
  MoveBackSteps: 2

Trade Sequence (Global Position):

Time Symbol Result Global Pos Multiplier Size
09:00 BTC WIN 0β†’1 1x $500
09:30 ETH WIN 1β†’2 1x $500
10:00 SOL WIN 2β†’3 2x $1,000
10:30 BTC LOSS 3β†’1 3x $1,500
11:00 ETH WIN 1β†’2 1x $500

Key Point: Global position prevents over-leveraging when all crypto pairs move together.

Example 3: Martingale Grid Trading

Profile:

  • Capital: $20,000
  • Base: $200 (1%)
  • Grid: 10 levels
  • Range-bound market
MoneyManagementStrategySettings:
  Sequence: [1, 2, 4, 8, 16, 32, 64]
  Mode: 0
  SkipSymbol: false
  MoveBackSteps: 0           # Reset on win

Grid Scenario:

Price drops through 3 grid levels (3 losses):
Position: 0β†’1β†’2β†’3
Sizes: $200, $400, $800
Loss: -$1,400

Price bounces back (1 win):
Position: 3β†’0 (RESET)
Size: $1,600
Win: +$1,600

Net: +$200 (recovered + profit)

⚑ Risk Management

Capital Requirements by Strategy

Strategy Max Multiplier Min Capital Recommended Max Drawdown
Conservative (5x max) 5x $2,000 $5,000 -25%
Moderate (10x max) 10x $5,000 $15,000 -35%
Fibonacci (55x max) 55x $20,000 $75,000 -60%
Martingale (128x max) 128x $50,000 $200,000 -80%

Safety Guidelines

1. Balance Thresholds

General:
  InitialTradeAmount: 300
  MinBalance: 2000    # Stop if balance drops below
  MaxBalance: 100000  # Stop scaling if exceeds

2. Position Size Limits

  • Single trade: Never exceed 5% of capital
  • Total exposure: All open trades < 20% of capital
  • Mode 1 traders: Use 1-2% base size (amplifies on wins)
  • Mode 0 traders: Use 2-4% base size (amplifies on losses)

3. Circuit Breakers

# Implement these safety stops:
- Daily loss limit: -5% of capital
- Weekly loss limit: -10% of capital  
- Consecutive losses: Auto-stop after 5
- Drawdown from peak: Stop at -20%
- Time-based: No trading during high volatility events

4. Sequence Design Rules

  • Start conservative: First 2-3 positions at 1x
  • Gradual scaling: Avoid jumps >2x between positions
  • Cap maximum: Last positions can repeat (plateau)
  • Length consideration: 7-10 positions optimal for most strategies

⚠️ Wrap-Around Risk

If you frequently hit sequence end and wrap around, your sequence is too short for your trading pattern. Either extend the sequence or reduce position sizes.


πŸ”§ Troubleshooting

Issue 1: Position Not Updating

Symptoms:

  • All trades using same multiplier
  • Position stuck at 0 or another number

Solutions:

# Check 1: Ensure sequence is not empty
Sequence: []        # ❌ Disabled
Sequence: [1, 2, 3] # βœ… Enabled

# Check 2: Verify trades are completing
# Position only updates after trade closes (storage_status = 1 or 2)

# Check 3: Check SkipSymbol setting
SkipSymbol: false   # Per-symbol (check BTC history for BTC trades)
SkipSymbol: true    # Global (checks all symbols)

Issue 2: Unexpected Position Jumps

Symptoms:

  • Position jumps from 2 to 0
  • Size changes dramatically

Cause: MoveBackSteps > current position

# Example:
Current position: 2
MoveBackSteps: 3
Result: 2 - 3 = -1 β†’ clamped to 0 (saturating_sub)

# This is normal behavior - backward movement stops at 0

Issue 3: Wrapping Too Frequently

Symptoms:

  • Logs show "wrapped to position 0"
  • Never reaching high multipliers

Solutions:

# Option 1: Extend sequence
# Before:
Sequence: [1, 2, 3, 5, 8]

# After:
Sequence: [1, 2, 3, 5, 8, 13, 21, 34, 55]

# Option 2: Add plateau at end
Sequence: [1, 2, 3, 5, 8, 13, 13, 13, 13, 13]
# Stays at 13x instead of wrapping

Issue 4: Global Position Affects Wrong Symbols

Symptoms:

  • BTC trade changes ETH position
  • Unrelated symbols using same multiplier

Cause: SkipSymbol: true when you want per-symbol tracking

# Change from:
SkipSymbol: true    # Global tracking

# To:
SkipSymbol: false   # Per-symbol tracking

Issue 5: Position Size Too Conservative

Symptoms:

  • Not recovering from losses fast enough
  • Multipliers too low

Solutions:

# Option 1: Steeper sequence
# Before:
Sequence: [1, 1, 1, 2, 2, 3, 3]

# After:
Sequence: [1, 2, 3, 5, 8, 13]

# Option 2: Reduce MoveBackSteps (slower retreat)
# Before:
MoveBackSteps: 3

# After:
MoveBackSteps: 1

Issue 6: Position Size Too Aggressive

Symptoms:

  • Hitting margin limits
  • Emotional stress
  • Large account swings

Solutions:

# Option 1: Flatten sequence
# Before:
Sequence: [1, 2, 4, 8, 16, 32, 64]

# After:
Sequence: [1, 2, 3, 5, 7, 10, 12]

# Option 2: Increase MoveBackSteps (faster retreat)
# Before:
MoveBackSteps: 1

# After:
MoveBackSteps: 2 or 3

# Option 3: Add plateau
Sequence: [1, 2, 4, 6, 8, 10, 10, 10, 10]

πŸ“‹ Quick Reference

Configuration Template

# COPY AND CUSTOMIZE THIS TEMPLATE

MoneyManagementStrategySettings:
  # Choose one sequence type:
  
  # Conservative (Beginner)
  Sequence: [1, 1, 1, 2, 2, 3, 3, 5]
  
  # Moderate (Intermediate)  
  # Sequence: [1, 1, 2, 3, 5, 8, 13, 21]
  
  # Aggressive (Advanced)
  # Sequence: [1, 2, 4, 8, 16, 32, 64]
  
  # Choose mode:
  Mode: 0              # 0 = Recovery (most common)
                       # 1 = Momentum (high win rate only)
  
  # Symbol tracking:
  SkipSymbol: false    # false = per-symbol
                       # true = global/portfolio-wide
  
  # Backward movement:
  MoveBackSteps: 1     # 0 = reset to start
                       # 1 = back 1 step (default)
                       # 2 = back 2 steps (Fibonacci)
                       # N = back N steps (custom)

Strategy Quick Picks

Goal Sequence Mode MoveBackSteps
Safe Recovery [1,1,2,3,5,8] 0 1
Classic Fibonacci [1,1,2,3,5,8,13,21] 1 2
Martingale [1,2,4,8,16,32] 0 0
Anti-Martingale [1,2,4,8,16] 1 0
D'Alembert [1,2,3,4,5,6,7,8] 0 1
Portfolio Risk [1,1,2,3,5,8] 1 2 + SkipSymbol:true

βœ… Pre-Launch Checklist

Before enabling money management in live trading:

  • [ ] Tested in demo mode for minimum 30 days
  • [ ] Tracked actual win/loss patterns from your strategy
  • [ ] Verified position calculations in logs
  • [ ] Confirmed sequence matches available capital
  • [ ] Set MinBalance and MaxBalance limits
  • [ ] Calculated maximum possible loss (worst case)
  • [ ] Implemented circuit breakers / stop-loss rules
  • [ ] Documented emergency shutdown procedure
  • [ ] Chosen correct Mode (0 or 1) for your win rate
  • [ ] Set appropriate MoveBackSteps for your risk tolerance
  • [ ] Decided on SkipSymbol (per-symbol vs global)
  • [ ] Reviewed wrap-around implications for your sequence length
  • [ ] Planned weekly review of performance and adjustments

✨ Final Tip

Money management enhances a profitable strategy but won't fix a losing one. Always prioritize strategy quality and win rate first, then optimize position sizing second.


Good luck with your trading! πŸš€
Remember: Start small, test thoroughly, and scale gradually.

πŸ“Ž Related Topics