MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] 7795998890 Bolt: optimize daily limit checks and reduce redundant API calls
- Cached daily currency limits in global variables `g_maxDailyLossCurrency` and `g_maxDailyProfitCurrency`.
- Implemented `RefreshDailyLimits()` to update these limits only on initialization, day rollover, and trade events.
- Updated `CheckDailyLimits()` to use cached values, avoiding multiple `AccountInfoDouble(ACCOUNT_BALANCE)` calls and divisions in the `OnTick` path.
- Modified `UpdateDailyStatistics()` to accept an optional timestamp, reducing redundant `TimeCurrent()` calls in `OnTick`.
- Added detailed comments explaining the performance optimizations.

Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
2026-02-05 17:15:27 +00:00
..
Experts Bolt: optimize daily limit checks and reduce redundant API calls 2026-02-05 17:15:27 +00:00
Indicators Bolt: optimize indicator OnCalculate performance (revised) 2026-01-31 10:52:36 +00:00