bifurqué depuis LengKundee/MQL5-Google-Onedrive
💡 **What:** This optimization refactors the `OnTick` function to check for cheap conditions (like a Donchian breakout) *before* performing expensive fractal calculations. 🎯 **Why:** The original code calculated fractals on every new bar, even when no trade signal was possible. This wasted CPU cycles on the vast majority of ticks. 📊 **Impact:** This change significantly reduces CPU load by avoiding expensive `CopyBuffer` calls and loops when they are not needed. The EA will run more efficiently, especially on lower timeframes with many ticks. 🔬 **Measurement:** The improvement can be verified by profiling the EA's execution time in the MetaTrader 5 Strategy Tester. The optimized version will show a lower average execution time per tick, especially in market conditions without frequent breakouts. |
||
|---|---|---|
| .. | ||
| MQL5 | ||