miroir de
https://github.com/A6-9V/MQL5-Google-Onedrive.git
synchronisé 2026-04-11 10:20:57 +00:00
This optimization reduces the overhead in the OnTick execution path of ExpertMAPSARSizeOptimized_Improved.mq5 by caching daily loss and profit limits in currency. - Added g_maxDailyLossCurrency and g_maxDailyProfitCurrency global variables. - Updated UpdateDailyStatistics() to calculate and cache these limits only when necessary (initialization, day rollover, trade events, and periodic timer). - Optimized CheckDailyLimits() to use the cached variables, eliminating redundant AccountInfoDouble(ACCOUNT_BALANCE) calls and percentage divisions on every tick. These changes significantly reduce terminal API calls and arithmetic operations in the EA's most frequent execution path. |
||
|---|---|---|
| .. | ||
| MQL5 | ||