Reduce_risks - MetaTrader 5 Expert | MT5 EA Download - MetaTrader 5 Resources


This is from the article " How the MQL5 Version of Expert Advisors Reduce Trader's Risk ".
The EA runs on every tick and can be optimized:
Sample test program run with appropriate settings (terminal is restarted before each test, cache is not cleared):

The picture below is before code optimization:

Now, after a small code optimization, three are running:
As we can see, now some variables are declared as "static" type and overridden only on new bars, we can save 2 minutes.
The attachment for version 1.013 contains optimized code.
Attachment download
📎 reduce_risks.mq5 (114.03 KB)
Source: MQL5 #19726
Reduce_risks - MetaTrader 5 Expert | MT5 EA Download - MetaTrader 5 resource usage and screening suggestions
Reduce_risks - MetaTrader 5 Expert | MT5 EA Download - MetaTrader 5 resources are MT5 EA related resources. Before downloading or referencing, it is recommended to confirm the platform version, transaction type, time period, whether DLL is required, whether source code is included, parameter description and historical update records.
Both automated trading tools and foreign exchange indicators should first undergo backtesting, simulated account observation, and small capital verification. Pay special attention to spreads, slippages, maximum drawdowns, position opening frequency, stop loss methods, trading periods and broker rules, and avoid direct real-time execution based only on titles or short-term profit descriptions.
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •