0
0
Fork 1
Spiegel von https://github.com/A6-9V/MQL5-Google-Onedrive.git synchronisiert 2026-04-11 04:30:56 +00:00
MQL5-Google-Onedrive/mt5/MQL5/Experts
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
..
ExpertMAPSARSizeOptimized_Improved.mq5 Bolt: Optimize Daily Limit Checks and OnTick Flow 2026-02-11 10:57:42 +00:00
SMC_TrendBreakout_MTF_EA.mq5 Bolt: Optimize lot calculation and margin clamping 2026-02-08 19:20:35 +00:00