> For the complete documentation index, see [llms.txt](https://copier-docs.redfox-capital.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://copier-docs.redfox-capital.com/config/lot-size-and-risk-management-guide.md).

# Lot Size & Risk Management Guide

### 📋 Overview

This section controls how the EA calculates lot sizes for each trade. You can choose between automatic lot sizing based on risk percentage, or fixed lot sizes.

***

### ⚙️ Settings Explained

#### **1. Lot Size Calculation Mode**

```
LotMode = AUTO_LOT | FIXED_LOTSIZE | LOT_BY_BALANCE
```

**AUTO\_LOT**: EA automatically calculates lot size based on your risk percentage and Stop Loss distance.

* ✅ Best for consistent risk management
* ✅ Adapts to different Stop Loss sizes
* ⚠️ Requires proper SL in signals

**FIXED\_LOTSIZE**: Uses predetermined lot sizes regardless of risk.

* ✅ Simple and predictable
* ✅ Good for testing strategies
* ⚠️ Risk varies with SL distance

**LOT\_BY\_BALANCE**: Scales lot size with account balance.

***

#### **2. Basic Risk Settings**

**Balance**

```
Balance = 1000  // Account balance for calculations
```

* Set to `0` → EA uses your current MT4 account balance
* Set to specific value → EA uses this for risk calculations
* Useful for testing with virtual balance

**MaxRiskPerTrade**

```
MaxRiskPerTrade = 1  // Risk 1% per trade
```

* Percentage of balance you're willing to risk per trade
* Example: $10,000 balance × 1% = $100 risk per trade
* **Conservative**: 0.5-1%
* **Moderate**: 1-2%
* **Aggressive**: 2-5%

**LotDefault**

```
LotDefault = 0.01  // Fixed lot size
```

* Used when `LotMode = FIXED_LOTSIZE`
* This is your default lot for all trades

***

#### **3. TP Level Configuration**

**MaxTPLevel**

```
MaxTPLevel = TP5  // Can be TP1, TP2, TP3, TP4, TP5
```

Sets the highest Take Profit level EA will use from signals.

**Example:**

* Signal has: TP1, TP2, TP3, TP4, TP5
* You set: `MaxTPLevel = TP3`
* EA will only open orders for TP1, TP2, TP3
* TP4 and TP5 are ignored

**MaxOrdersPerSignal**

```
MaxOrdersPerSignal = 1  // Max orders per signal
```

* `1` = Open only 1 order per signal
* `3` = Open up to 3 orders (for TP1, TP2, TP3)
* `5` = Open 5 orders (one for each TP level)

**numberOpenOrderConfig**

```
numberOpenOrderConfig = NUMBER_BY_TP_SIGNAL | NUMBER_BY_CONFIG
```

**NUMBER\_BY\_TP\_SIGNAL**: Opens orders based on TP levels in signal

* Signal has TP1, TP2, TP3 → Opens 3 orders

**NUMBER\_BY\_CONFIG**: Opens orders based on `MaxOrdersPerSignal`

* Even if signal has 5 TPs, opens only `MaxOrdersPerSignal` orders

***

#### **4. Fixed Lot Per TP Level**

Used when `LotMode = FIXED_LOTSIZE`

```
LotTP1 = 0.03  // 0.03 lot for TP1 order
LotTP2 = 0.02  // 0.02 lot for TP2 order
LotTP3 = 0.01  // 0.01 lot for TP3 order
LotTP4 = 0.01
LotTP5 = 0.01
```

**Example Scenario:**

* Signal: EURUSD BUY with TP1, TP2, TP3
* EA opens:
  * Order 1: 0.03 lot → TP1
  * Order 2: 0.02 lot → TP2
  * Order 3: 0.01 lot → TP3
* Total exposure: 0.06 lot

***

#### **5. Auto Lot Risk Per TP Level**

Used when `LotMode = AUTO_LOT`

```
RiskPerTradeTP1 = 1  // Risk 1% for TP1
RiskPerTradeTP2 = 1  // Risk 1% for TP2
RiskPerTradeTP3 = 1  // Risk 1% for TP3
RiskPerTradeTP4 = 1
RiskPerTradeTP5 = 1
```

**How it works:**

For each TP level, EA calculates:

```
Lot Size = (Balance × Risk%) / (SL Distance in $ per lot)
```

**Example:**

* Balance: $10,000
* Risk per TP: 1%
* SL Distance: 50 pips
* Pip Value: $10/lot for EURUSD

Calculation for TP1:

```
Risk Amount = $10,000 × 1% = $100
SL Value = 50 pips × $10 = $500 per lot
Lot Size = $100 / $500 = 0.20 lot
```

***

#### **6. AllowPendingForDualEntry**

```
AllowPendingForDualEntry = true
```

When signal has 2 entry prices:

* `true`: Opens 1 market order at current price + 1 pending order at 2nd entry
* `false`: Opens only 1 market order, ignores 2nd entry

***

### 📊 Configuration Examples

#### **Example 1: Conservative Trader**

```
LotMode = AUTO_LOT
Balance = 0  // Use current balance
MaxRiskPerTrade = 0.5  // Risk only 0.5%
MaxTPLevel = TP3
MaxOrdersPerSignal = 3
RiskPerTradeTP1 = 0.5
RiskPerTradeTP2 = 0.3
RiskPerTradeTP3 = 0.2
```

**Result:** Very low risk, takes profit at 3 levels with decreasing risk allocation.

***

#### **Example 2: Aggressive Trader**

```
LotMode = AUTO_LOT
Balance = 0
MaxRiskPerTrade = 2  // Risk 2% per trade
MaxTPLevel = TP5
MaxOrdersPerSignal = 5
RiskPerTradeTP1 = 2
RiskPerTradeTP2 = 1.5
RiskPerTradeTP3 = 1
RiskPerTradeTP4 = 0.5
RiskPerTradeTP5 = 0.5
```

**Result:** Higher risk, takes all 5 TP levels with front-loaded risk.

***

#### **Example 3: Fixed Lot Scalper**

```
LotMode = FIXED_LOTSIZE
LotDefault = 0.10
MaxTPLevel = TP1
MaxOrdersPerSignal = 1
LotTP1 = 0.10
```

**Result:** Simple setup, 0.10 lot per trade, only TP1.

***

#### **Example 4: Balanced Pyramiding**

```
LotMode = FIXED_LOTSIZE
MaxTPLevel = TP3
MaxOrdersPerSignal = 3
LotTP1 = 0.05  // Largest position
LotTP2 = 0.03  // Medium
LotTP3 = 0.02  // Smallest
```

**Result:** Classic pyramiding - larger position at closer TP, smaller at distant TP.

***

#### **Example 5: Equal Risk Distribution**

```
LotMode = AUTO_LOT
Balance = 0
MaxRiskPerTrade = 1.5
MaxTPLevel = TP4
MaxOrdersPerSignal = 4
RiskPerTradeTP1 = 1.5
RiskPerTradeTP2 = 1.5
RiskPerTradeTP3 = 1.5
RiskPerTradeTP4 = 1.5
```

**Result:** Each TP level has equal 1.5% risk.

***

### ⚠️ Important Notes

#### **Risk Calculation Formula**

When using AUTO\_LOT:

```
Lot = (Balance × Risk%) / (SL in pips × Pip Value)
```

**Key factors:**

1. **Balance**: Higher balance → larger lots
2. **Risk%**: Higher % → larger lots
3. **SL Distance**: Larger SL → smaller lots (to maintain risk)
4. **Pip Value**: Varies by instrument (EURUSD ≠ XAUUSD)

***

#### **Common Mistakes to Avoid**

❌ **Setting MaxRiskPerTrade = 0 with AUTO\_LOT**

* EA will fail to initialize
* Must be > 0

❌ **Total risk > account balance**

* Example: 5 orders × 2% each = 10% total risk
* With losing streak, can blow account quickly

❌ **Not considering correlation**

* Opening EURUSD, GBPUSD, AUDUSD at once
* All may move together = multiplied risk

❌ **Using AUTO\_LOT without SL**

* EA cannot calculate lot size
* Will skip order or use default

***

### 💡 Best Practices

#### ✅ **1. Start Conservative**

```
MaxRiskPerTrade = 0.5-1%
Total risk per signal (all TPs) < 3%
```

#### ✅ **2. Decrease Risk for Higher TPs**

```
RiskPerTradeTP1 = 1.0  // Close TP = higher confidence
RiskPerTradeTP2 = 0.7  // Medium TP
RiskPerTradeTP3 = 0.5  // Distant TP = lower confidence
```

#### ✅ **3. Test on Demo First**

* Run for 1-2 weeks
* Verify lot sizes are reasonable
* Check total exposure

#### ✅ **4. Monitor Drawdown**

* Max drawdown should be < 20%
* If exceeds, reduce risk%

#### ✅ **5. Account for Leverage**

* Higher leverage ≠ higher profit
* Use proper risk% regardless of leverage

***

### 🎯 Quick Start Recommendations

#### **Small Account ($500-$2000)**

```
LotMode = AUTO_LOT
Balance = 0
MaxRiskPerTrade = 1
MaxTPLevel = TP2
MaxOrdersPerSignal = 2
RiskPerTradeTP1 = 1
RiskPerTradeTP2 = 0.5
```

#### **Medium Account ($2000-$10000)**

```
LotMode = AUTO_LOT
Balance = 0
MaxRiskPerTrade = 1
MaxTPLevel = TP3
MaxOrdersPerSignal = 3
RiskPerTradeTP1 = 1
RiskPerTradeTP2 = 0.8
RiskPerTradeTP3 = 0.5
```

#### **Large Account ($10000+)**

```
LotMode = AUTO_LOT
Balance = 0
MaxRiskPerTrade = 0.5-1
MaxTPLevel = TP4
MaxOrdersPerSignal = 4
RiskPerTradeTP1 = 1
RiskPerTradeTP2 = 0.8
RiskPerTradeTP3 = 0.6
RiskPerTradeTP4 = 0.4
```

***

### 📞 Support

If you have questions about lot sizing:

1. Check your EA logs for lot calculation details
2. Test on demo account first
3. Contact support with specific scenarios

**Remember:** Good risk management = Long-term success! 🚀
