forked from LengKundee/MQL5-Google-Onedrive
Optimized the `CalculateLots` function in `SMC_TrendBreakout_MTF_EA.mq5` by: 1. Caching the inverse of the initial margin in `OnInit` to replace division with multiplication. 2. Refactoring the logic to apply margin constraints before normalization, ensuring a single execution path for rounding and clamping. 3. Reducing redundant `MathFloor`, `MathMax`, and `MathMin` calls. These changes improve performance during trade execution and follow the codebase pattern of caching expensive constants. Test results: - `scripts/ci_validate_repo.py`: PASSED - `scripts/test_automation.py`: PASSED |
||
|---|---|---|
| .. | ||
| Experts | ||
| Indicators | ||