Commit graph

11 commits

Author SHA1 Message Date
google-labs-jules[bot]
cfb558838c feat: ️ add new bar check to OnTick to reduce CPU usage
💡 What: Added a lightweight new bar check at the beginning of the `OnTick()` function. This prevents the entire function from executing on every price tick if a new bar has not yet formed.

🎯 Why: The `OnTick()` function is computationally expensive, involving calls to `CopyRates`, `CopyBuffer`, and various loops. Without this check, these expensive operations were being performed multiple times per second, consuming unnecessary CPU cycles.

📊 Impact: This change will dramatically reduce the EA's CPU usage, especially on active symbols, by ensuring the core trading logic runs only once per bar instead of on every tick.

🔬 Measurement: The improvement can be verified by observing the EA's execution time in the MetaTrader 5 "Experts" log tab. Before this change, log entries would appear on every tick. After this change, they will only appear once per bar, demonstrating the reduction in executions.
2026-01-08 17:03:53 +00:00
google-labs-jules[bot]
4d34289b02 feat(perf): Cache MTF confirmation to reduce redundant calculations
Implements a caching mechanism for the multi-timeframe (MTF) trend confirmation in `GetMTFDir`.

The trend direction from the lower timeframe is now calculated only when a new bar forms on that timeframe, instead of on every tick of the main chart. The result is cached and returned on subsequent calls until the next lower timeframe bar appears.

This avoids expensive and redundant `CopyBuffer` calls, significantly improving the EA's performance and efficiency, especially when the signal timeframe is much shorter than the confirmation timeframe. Logic was carefully updated to read from the last *completed* bar to prevent any change in trading behavior.
2026-01-07 10:37:51 +00:00
copilot-swe-agent[bot]
f3a56948cb Update WebRequestURL to soloist.ai and add ZOLO plugin integration
Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
2026-01-05 11:37:02 +00:00
google-labs-jules[bot]
ef9c877700 feat: Add web request functionality to Expert Advisor
This change adds the ability for the Expert Advisor to send a web request to a user-defined URL when a trading signal is generated. This allows for integration with external services and websites.

The following changes were made:

- Added `EnableWebRequest` and `WebRequestURL` input parameters to the "Notifications" section of the EA.
- Created a new `SendWebRequest` function that sends a POST request with a JSON payload to the specified URL.
- Modified the `Notify` function to call `SendWebRequest` when a notification is triggered.
- Added a comment to the code to remind the user to add the URL to the MetaTrader 5 terminal's list of allowed URLs.
2026-01-04 20:16:44 +00:00
google-labs-jules[bot]
fd9514b9bd Bolt: Optimize Donchian Channel price lookup
💡 What: Replaced `iHigh()` and `iLow()` function calls with direct array access within the `OnTick()` function for retrieving Donchian Channel price levels.

🎯 Why: The `OnTick()` function is a performance-critical hot path that executes on every price update. The original code made redundant function calls to `iHigh()` and `iLow()` to retrieve price data that was already loaded into the local `rates` array.

📊 Impact: This change reduces unnecessary function call overhead in a high-frequency loop. While a micro-optimization, it leads to a small but meaningful improvement in execution speed and reduces processing time for each tick.

🔬 Measurement: Performance can be verified by profiling the `OnTick()` function's execution time in the MetaTrader 5 Strategy Tester before and after the change. A decrease in the average execution time per tick would confirm the improvement.
2025-12-30 10:33:03 +00:00
google-labs-jules[bot]
31eaf10a0c feat(mql5): Bolt: Use global Ask/Bid in OnTick
Replaces `SymbolInfoDouble` calls with direct `Ask` and `Bid` global variables in the `OnTick` function to improve performance.

**💡 What:** The optimization replaces function calls (`SymbolInfoDouble`) with direct access to pre-defined global variables (`Ask` and `Bid`) for fetching the latest market prices inside the performance-critical `OnTick` function.

**🎯 Why:** The `OnTick` function is executed on every price tick, making it a "hot path." Calling `SymbolInfoDouble` involves function call overhead (stack management, etc.). Using the globally available `Ask` and `Bid` variables is a standard MQL5 optimization that provides a direct, faster way to access the same information.

**📊 Impact:** This change reduces the execution time of each `OnTick` cycle by a small but meaningful amount. In a high-frequency environment, this micro-optimization can lead to a noticeable reduction in CPU usage and faster response times.

**🔬 Measurement:** The performance improvement can be verified by using the MetaTrader 5 Strategy Tester's profiling tools. A backtest run with profiling enabled would show a reduced execution time for the `OnTick` function compared to the previous version.
2025-12-28 19:02:42 +00:00
Cursor Agent
7d3a565d6f Add cached point size for performance
Co-authored-by: genxdbxfx3 <genxdbxfx3@gmail.com>
2025-12-27 20:33:29 +00:00
google-labs-jules[bot]
0bbcba4c14 feat(ea): cache static symbol properties on init
What:
Caches the results of `SymbolInfo...` calls (e.g., tick size, volume step, point value) into global variables once during the Expert Advisor's `OnInit` function. Helper functions and `OnTick` logic are refactored to use these cached values instead of making repeated calls.

Why:
The `OnTick` function is executed frequently, and the `SymbolInfo...` functions involve lookups that are unnecessary to repeat for static data. This repeated lookup adds processing overhead to every tick, which can be significant in volatile markets. Caching these values reduces the per-tick workload, making the EA more efficient.

Impact:
This change is expected to reduce the execution time of the `OnTick` function, leading to faster response times and lower CPU usage. While the exact impact depends on market conditions and broker execution, this is a standard and effective optimization practice in MQL5.

Measurement:
The performance improvement can be verified by profiling the EA's `OnTick` execution time in the MetaTrader 5 Strategy Tester before and after the change. A noticeable reduction in the average execution time per tick is expected.
2025-12-27 19:05:05 +00:00
google-labs-jules[bot]
cd70803a4e feat: Optimize Donchian channel calculation
Replaced the manual `HighestHighMql` and `LowestLowMql` loops with the built-in, native MQL5 functions `iHighest` and `iLowest`.

This change improves performance within the `OnTick` handler by leveraging optimized, pre-compiled platform functions instead of slower, scripted iterations. This leads to a more efficient and responsive Expert Advisor.
2025-12-26 10:32:51 +00:00
Cursor Agent
11782a3d7f feat: Add SL/TP modes and risk management to EA
Co-authored-by: genxdbxfx3 <genxdbxfx3@gmail.com>
2025-12-26 08:17:39 +00:00
Cursor Agent
cd29b25967 feat: Add SMC Trend Breakout MTF indicator and EA
Co-authored-by: genxdbxfx3 <genxdbxfx3@gmail.com>
2025-12-26 07:26:47 +00:00