More BackTest Results
- Bibliotecas
- Yu Zhang
- Versão: 1.1
- Atualizado: 19 fevereiro 2022
- Ativações: 20
1. What is this
The MT5 system comes with very few optimization results. Sometimes we need to study more results. This library allows you to output more results during backtest optimization. It also supports printing more strategy results in a single backtest.
2. Product Features
- The results of the optimized output are quite numerous.
- CustomMax can be customized.
- The output is in the Common folder.
- It is automatically named according to the name of the EA, and the name of the same EA will be automatically updated for multiple backtests without overwriting the previous results.
- The function is so simple that you can understand it at a glance.
#import "More BackTest Results.ex5" // Libraries Folder, Download from the market. //---Set CustomMax void iSetCustomMax(string mode); //---Display multiple strategy results when backtesting alone (not opt). void iOnDeinit(); //--- void iOnTesterInit(); double iOnTester(); void iOnTesterPass(string lang = "EN"); // set language. void iOnTesterDeinit(); #import
3. How to use
- Download the .ex5 library, normally it is under the \Scripts\Market folder. Then move it to the \Libraries folder.
- Download the More_BackTest_Result.mqh file from this link and place the More_BackTest_Result.mqh file in the Include folder.
- You can refer to the usage method in More_BackTest_Result.mqh, I designed it very simple, so that you can understand it at a glance.
- Usually, you just need to load a code in the EA and you're done.
#include <More_BackTest_Result.mqh>
- If you need to modify the language, it is not necessary, you need to modify an affix in mqh. Refer to 4 for details.
- If you need to set CustomMax, you need to set it in EA, it is not necessary, the default is TB value. Refer to 5 for details.
4. Change the language
Support English (EN) and Chinese (CN), it is not necessary, if you do not set it, the default is English, you can also set the output to Chinese.
Just modify an affix in More_BackTest_Result.mqh:
void OnTesterPass() { // You can set the language to Chinese or English. string language = "EN"; // "EN","CN" iOnTesterPass(language); }
5. Set CustomMax
All policy results are supported as CustomMax. It is not required. If you do not set it, it defaults to the TB value. You can also set it according to your own needs.
You just need to type the following code in your EA:
int OnInit() { //---Set CustomMax iSetCustomMax("CUSTOM_SQN"); //--- return(INIT_SUCCEEDED); }
6. Function iSetCustomMax(string mode) parameter analysis
Please refer to the Chinese and English versions: https://www.mql5.com/en/blogs/post/748011
7. EA uses samples
//+------------------------------------------------------------------+ //| __TEST_EX__.mq5 | //| Copyright 2022, i201102053. | //| https://www.mql5.com/en/users/i201102053 | //+------------------------------------------------------------------+ #property copyright "Copyright 2022, i201102053." #property link "https://www.mql5.com/en/users/i201102053" #property version "1.00" #include <More_BackTest_Result.mqh> // Usually it is enough to load this sentence. //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //---Set CustomMax, unnecessary. iSetCustomMax("CUSTOM_SQN"); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //---Display multiple strategy results when backtesting alone (not opt). unnecessary iOnDeinit(); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { }