forked from LengKundee/MQL5-Google-Onedrive
- 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> |
||
|---|---|---|
| .. | ||
| MQL5 | ||