1
0
Derivar 0
MQL5-Google-Onedrive/mt5
google-labs-jules[bot] 1d45156fc0 Bolt: Optimized lot and SL calculations in EA
Optimized the performance-critical path in SMC_TrendBreakout_MTF_EA.mq5 by:
- Pre-calculating the inverse of g_lotStep and g_marginInitial in OnInit() to replace division operations with faster multiplications in CalculateLots().
- Pre-calculating the swing SL buffer (SwingSLBufferPoints * g_point) in OnInit() to avoid repeated calculations in CalculateSL().
- Adding robustness checks for zero values before inverse calculation.

These changes reduce computational overhead during backtesting and live execution.

Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
2026-02-03 19:14:32 +00:00
..
MQL5 Bolt: Optimized lot and SL calculations in EA 2026-02-03 19:14:32 +00:00