MQL5-Google-Onedrive/mt5/MQL5/Indicators
google-labs-jules[bot] c6cc2d93bd Bolt: Optimize indicator buffer clearing and EA lot calculation
This commit implements two performance improvements:
1. In SMC_TrendBreakout_MTF.mq5 (indicator): Replaced a manual loop for clearing indicator buffers with the native ArrayFill() function. Native functions are implemented in optimized C++ and are significantly faster for bulk memory operations.
2. In SMC_TrendBreakout_MTF_EA.mq5 (EA): Pre-calculated the inverse initial margin (g_invMarginInitial) in OnInit() to replace an expensive division operation with a faster multiplication in the CalculateLots() hot path.

Both changes follow the Bolt philosophy of improving efficiency through native function usage and mathematical optimizations.

📊 Impact:
- Reduces indicator calculation overhead during new bar events.
- Reduces trade execution latency by optimizing lot size calculation.

🔬 Measurement: Verified with repository validation scripts and code review.

Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
2026-02-05 19:39:02 +00:00
..
SMC_TrendBreakout_MTF.mq5 Bolt: Optimize indicator buffer clearing and EA lot calculation 2026-02-05 19:39:02 +00:00