Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

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

author EAcpu | 2 reads | 0 comments |

Reduce_risks - expert for MetaTrader 5

Reduce_risks - expert for MetaTrader 5

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):

Reduce_risks - expert for MetaTrader 5

The picture below is before code optimization:

Reduce_risks - expert for MetaTrader 5

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.

Verification code Refresh