MQL5-Google-Onedrive/mt5/MQL5/Experts
google-labs-jules[bot] 6b51e334b3 feat(performance): Cache AccountInfo calls in OnTick
Refactors the trade execution logic to avoid redundant `AccountInfoDouble()` calls.

Previously, `CalculateLots` would call `AccountInfoDouble()` for balance/equity and free margin every time a trade was initiated.

This change hoists these calls into the `OnTick` function, fetching the values only once when a trade signal is confirmed. The values are then passed down as arguments to `OpenBuyTrade`/`OpenSellTrade` and finally to `CalculateLots`.

This reduces unnecessary function call overhead in a performance-critical path.

Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
2026-01-28 19:25:41 +00:00
..
ExpertMAPSARSizeOptimized_Improved.mq5 Improve ExpertMAPSARSizeOptimized EA with enhanced risk management, logging, and safety features 2026-01-19 14:19:52 +07:00
SMC_TrendBreakout_MTF_EA.mq5 feat(performance): Cache AccountInfo calls in OnTick 2026-01-28 19:25:41 +00:00