0
0
Fourche 1
miroir de https://github.com/A6-9V/MQL5-Google-Onedrive.git synchronisé 2026-04-11 04:30:56 +00:00
MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] 8cdd10efa4 Bolt: Cache MTF trend direction to reduce redundant calculations
💡 What:
Implemented a caching mechanism for the multi-timeframe (MTF) trend direction in the `GetMTFDir()` function. The trend is now recalculated only when a new bar forms on the lower timeframe.

🎯 Why:
The `GetMTFDir()` function was being called on every new bar of the main signal timeframe, leading to expensive and unnecessary `CopyBuffer` calls. Caching the result prevents these redundant calculations, improving the Expert Advisor's overall performance.

📊 Impact:
This change significantly reduces the number of expensive `CopyBuffer` calls, especially when the signal timeframe is much shorter than the confirmation timeframe (e.g., M5 signal, H1 confirmation). This leads to a more efficient EA that consumes fewer CPU cycles.

🔬 Measurement:
The improvement can be verified by adding logging to the `GetMTFDir()` function and observing that the recalculation logic is only triggered once per bar on the lower timeframe, rather than on every signal timeframe bar.
2026-01-01 10:32:55 +00:00
..
Experts Bolt: Cache MTF trend direction to reduce redundant calculations 2026-01-01 10:32:55 +00:00
Indicators feat: Add SL/TP modes and risk management to EA 2025-12-26 08:17:39 +00:00