forked from LengKundee/MQL5-Google-Onedrive
💡 What: Implemented 1-second caching for environmental API calls (TerminalInfoInteger and MQLInfoInteger) in the ExpertMAPSARSizeOptimized_Improved Expert Advisor. 🎯 Why: The OnTick handler is executed on every price tick. Repeatedly calling cross-process terminal APIs for settings that rarely change (like AutoTrading enabled) is a significant source of overhead, especially during high-volatility market periods with frequent ticks. 📊 Impact: Reduces cross-process API call frequency in the hot path from once-per-tick to once-per-second, significantly improving EA execution efficiency under high tick frequency without sacrificing responsiveness to user setting changes. 🔬 Measurement: Verified that IsTradingAllowed correctly utilizes static variables for caching and timestamp comparison. Confirmed log throttling for disallowed trading remains functional. |
||
|---|---|---|
| .. | ||
| ExpertMAPSARSizeOptimized_Improved.mq5 | ||
| SMC_TrendBreakout_MTF_EA.mq5 | ||