MQL5-Google-Onedrive/mt5
Repository files (latest commit first)
Filename Latest commit message Latest commit date
google-labs-jules[bot] cc70fa1064 ⚡ Bolt: optimize lot size calculation in SMC EA
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`.
2026-02-07 17:19:36 +00:00
..
MQL5 ⚡ Bolt: optimize lot size calculation in SMC EA 2026-02-07 17:19:36 +00:00