geforkt von LengKundee/MQL5-Google-Onedrive
- Consolidate trade counting and profit calculation into a single history scan in `UpdateDailyStatistics()`. - Refactor `OnTrade()` to remove redundant `HistorySelect` and secondary history loops. - Optimize `IsTradingAllowed()` with fast math for hour extraction, replacing expensive `TimeToStruct()` calls. - Reduce terminal API calls in `CheckDailyLimits()` by fetching account balance once. - Improve robustness of trade counting by using `DEAL_ENTRY_IN` check. - Reuse pre-fetched `TimeCurrent()` value across `OnTick()` and its sub-functions. Impact: Reduces redundant O(N) history scans and minimizes expensive terminal API calls on every price tick. Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| Experts | ||
| Indicators | ||