mirror of
https://github.com/A6-9V/MQL5-Google-Onedrive.git
synced 2026-04-11 16:09:16 +00:00
Optimized the `CalculateLots` function in `SMC_TrendBreakout_MTF_EA.mq5` by: 1. Replacing division by `g_marginInitial` with multiplication by a pre-calculated `g_invMarginInitial`. 2. Consolidating lot normalization and clamping into a single execution path at the end of the function. 3. Applying margin constraints before normalization to avoid redundant calculations. These changes improve performance in the trade execution path and ensure DRY principles are followed. Verified with `ci_validate_repo.py` and `test_automation.py`. |
||
|---|---|---|
| .. | ||
| MQL5 | ||