forked from LengKundee/MQL5-Google-Onedrive
Implements a caching mechanism for the multi-timeframe (MTF) trend direction calculation. The `GetMTFDir()` function, which relies on expensive `CopyBuffer` calls, was previously executed on every price tick. This change introduces a time-based cache, ensuring the MTF direction is only recalculated when a new bar forms on the secondary timeframe. This optimization significantly reduces the EA's CPU load by eliminating thousands of unnecessary calculations, leading to more efficient performance, especially in volatile market conditions. |
||
|---|---|---|
| .. | ||
| MQL5 | ||