forked from LengKundee/MQL5-Google-Onedrive
💡 What: Caches the result of the multi-timeframe (MTF) trend confirmation in the `GetMTFDir` function. 🎯 Why: Previously, the MTF trend was recalculated on every tick, which involved expensive `CopyBuffer` calls. This is inefficient as the MTF trend only changes when a new bar forms on that timeframe. 📊 Impact: This change significantly reduces the EA's CPU usage by avoiding thousands of unnecessary calculations, especially in volatile markets with many ticks per bar. The EA will be more responsive and consume fewer resources. 🔬 Measurement: The improvement can be verified by observing the EA's execution time in the MetaTrader 5 Strategy Tester's profiler. The time spent within the `GetMTFDir` function should be drastically lower after this change. |
||
|---|---|---|
| .. | ||
| SMC_TrendBreakout_MTF_EA.mq5 | ||