### Feature Update
**Average Quantity Calculation Based on Price and Enabled Pullback Levels**
A new feature has been added to calculate the average quantities based on the price and the number of enabled pullback levels. If enabled, this calculation considers the number of pullback levels with a non-zero value, divides this number by the available trading equity, and determines the average quantity for each pullback level. Unlike the default calculation, this method ensures that each pullback level has the same quantity.
If the average quantity calculation is disabled, the default calculation remains active. As a result, each pullback level will have different quantities for entries.
#### Case 1: Default Calculation
A trader has $100 in equity, with all 4 pullback levels active.
- **Pullback Level 1** is hit at a price of $0.9:
- Quantity = $100 / 4 / $0.9 = 27.78
- **Pullback Level 2** is hit at a price of $0.8:
- Quantity = $100 / 4 / $0.8 = 31.25
#### Case 2: Average Quantity Calculation Enabled
A trader has $100 in equity, with all 4 pullback levels active. The levels are set as follows:
- Level 1 = -10%
- Level 2 = -20%
- Level 3 = -30%
- Level 4 = -40%
Assuming the MA price is $1, the quantities for each level are calculated like so:
- **Level 1**: $100 / 4 / ($1 * -10%) = 27.78
- **Level 2**: $100 / 4 / ($1 * -20%) = 31.25
- **Level 3**: $100 / 4 / ($1 * -30%) = 35.72
- **Level 4**: $100 / 4 / ($1 * -40%) = 41.67
The total possible quantities are 139.42. Dividing by the number of active pullback levels gives an average quantity of 34.85 for each level.
#### Comparison of Case 1 and Case 2
The primary difference between these cases is evident in the quantity:
- **Case 1, level 1**: Quantity = 27.78
- **Case 1, level 2**: Quantity = 31.25
- **Case 1, level 3**: Quantity = 35.72
- **Case 1, level 4**: Quantity = 41.67
- **Case 2, level 1**: Quantity = 34.85
- **Case 2, level 2**: Quantity = 34.85
- **Case 2, level 3**: Quantity = 34.85
- **Case 2, level 4**: Quantity = 34.85
For strategies where level 1 is frequently hit and closes with a profit before hitting lower levels, enabling the average quantity calculation would be more advantageous.
**Note**: If any pullback levels are disabled by setting their value to 0, this average quantity calculation will automatically activate and override the default calculation.