MQL5-Google-Onedrive/mt5
google-labs-jules[bot] 680e2286a4 feat: Defer fractal calculation until needed
💡 What: Wrapped the fractal calculation logic (CopyBuffer and loops) inside a conditional if (UseSMC) block in the OnTick function.

🎯 Why: The original code calculated fractal swing points on every new bar, even when the "SMC" feature was disabled. This caused unnecessary CPU usage for users not utilizing that specific strategy component.

📊 Impact: Reduces CPU load during live trading and backtesting for any user who has UseSMC = false. The EA will skip two CopyBuffer calls and a loop on every bar, leading to faster OnTick execution and lower resource consumption.

🔬 Measurement: To verify, run the EA in the MetaTrader 5 Strategy Tester with UseSMC set to false. Profiling would show that the time spent within the OnTick function is reduced, as the fractal-related functions are no longer called.
2026-01-12 17:12:01 +00:00
..
MQL5 feat: Defer fractal calculation until needed 2026-01-12 17:12:01 +00:00