MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] a9ab02960b Bolt: optimize lot calculation and margin checks
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
2026-02-08 17:33:21 +00:00
..
Experts Bolt: optimize lot calculation and margin checks 2026-02-08 17:33:21 +00:00
Indicators Bolt: Optimized SMC_TrendBreakout_MTF indicator performance 2026-02-06 10:52:52 +00:00