MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] d6fdac641a Bolt: Optimize Daily Limit Checks and OnTick Flow
This commit improves the performance and efficiency of the `ExpertMAPSARSizeOptimized_Improved.mq5` Expert Advisor by:

1.  **Optimizing `CheckDailyLimits`**: Added a `static datetime lastLimitLogDay` flag to throttle logs and alerts. Once a daily limit is reached, subsequent calls for the rest of the day exit immediately, avoiding redundant string formatting, logging, and expensive `Alert()` API calls on every tick.
2.  **Optimizing `OnTick` Flow**: Reordered the execution path to call `CheckDailyLimits()` before `IsTradingAllowed()`. This prioritizes cheap, internal math checks over more expensive terminal environment API calls (`TerminalInfoInteger`, `MQLInfoInteger`), allowing the EA to exit significantly faster when trading is halted by daily limits.

These changes reduce CPU overhead in the "hot path" and eliminate log/alert flooding during high volatility.
2026-02-11 10:57:42 +00:00
..
Experts Bolt: Optimize Daily Limit Checks and OnTick Flow 2026-02-11 10:57:42 +00:00
Indicators Bolt: Optimized SMC_TrendBreakout_MTF indicator performance 2026-02-06 10:52:52 +00:00