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

OptimReport v2.15 - MetaTrader 5 Library | MT5 EA Download

author EAcpu | 5 reads | 0 comments |

OptimReport v2.15 - library for MetaTrader 5

OptimReport v2.15 - library for MetaTrader 5

OptimReport v2.15 - library for MetaTrader 5

OptimReport v2.15 - library for MetaTrader 5

OptimReport v2.15 - library for MetaTrader 5

If you want to use your own characteristics to optimize your Expert Advisor, you can use the "Custom Max" mode through the OnTester() function.

This code simplifies the creation of your own formulas.

In order to define custom optimization parameters, sometimes many trading characteristics need to be calculated.

This code provides you with the following characteristics:

Compared to the previous version, I added the option to save the optimization results (and all features) to an HTML file.

OptimReport v2.15 - library for MetaTrader 5

Copy the "OptimReport.mqh" file to the MQL5\Include\ folder

Add the following lines to the code of your Expert Advisor:

 #include
Add this line to the OnInit() function:
 Otim Report ( 1 );

Add this line to the OnTick() function:

 Otim Report ( 2 );

Add this line to the code when opening a position:

 Otim Report ( 3 );

Add the following 4 lines to the OnTester() function:

 Otim Report ( 4 );
Input parameters = "input" ; // Enter parameters here. See example below...
if (Crt_HTML) Sort_HTML_Ar(); return (Vigoda);

The following is an example of Input_Param:

 Input parameter = "TP_B=" + double to string (TP_B, 0 )
                + "SL_B=" + Double to string (SL_B, 0 )
                + "GT_B=" + Double to string (GT_B, 0 )
                + "TS_B=" + Double to string (TS_B, 0 );

suggestion:

The Lot_Risk variable is the margin percentage used in the trade (used to increase trade volume).

Please note that the HTML file containing the optimization results is saved separately for each agent: С:\Program Files (x86)\MetaTrader 5\Tester\Agent-127.0.0.1-3000\MQL5\Files\

If you find a bug or need some other features, please let me know.
It would be great if you provide your own optimization features.

PS: I prefer to use formula #5


Attachment download

📎 optimreport.mqh (21 KB)

Source: MQL5 #241

OptimReport v2.15 - Important points before using the MetaTrader 5 library

This page has been supplemented with structured instructions, focusing on the purpose of EA source code, MQL4/MQL5 platform compatibility, testing process and risk control. Before downloading or deploying, it is recommended to first determine whether it is consistent with your own variety, cycle and account environment.

Suitable for who to use

  • Users who want to quickly screen EA source code and are willing to do simulation disk verification first.
  • People who need to compare MT4/MT5 EAs, indicators, scripts or source code projects.
  • Traders who wish to record backtests, parameters and risk boundaries before placing a trade.

Testing and risk control suggestions

  • First verify the default parameters in the strategy tester or demo account, and then adjust the symbol, period, spread and trading period one by one.
  • Scalping, grid, martin, and high-frequency strategies should focus on observing maximum drawdowns, consecutive losses, slippage, and trading frequency.
  • It is not recommended to run any document directly on the real disk. At least observe the simulated disk performance for 2-4 weeks first.

FAQ

Can MT4 and MT5 be used interchangeably?
Usually cannot be used directly. EX4/MQ4 corresponds to MT4, EX5/MQ5 corresponds to MT5, and the source code needs to be compiled in the corresponding MetaEditor.

Is this resource guaranteed to be profitable?
cannot. EAs, indicators and scripts can only be used as trading tools, and the results depend on parameters, market environment, spreads, slippage and risk control.

What else can I continue to watch?
Forex EA download , foreign exchange indicator download , EA evaluation , MQL5 CodeBase .

English Search Notes

This page is also optimized for English search intent around OptimReport v2.15 - MetaTrader 5 library . Related search terms include: MQL4 source code, MQL5 source code. Test any Forex EA, Expert Advisor, MT4/MT5 indicator, script or MQL source code with historical data and a demo account before live trading.

Verification code Refresh