거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
라이브러리

Auto optimizer - MetaTrader 4용 라이브러리

조회수:
8835
평가:
(19)
게시됨:
2016.03.25 14:10
\MQL4\Include\
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

The detailed article on the usage of the auto optimizer library and principles of its operation can be found here: https://www.mql5.com/en/articles/1467

The code to insert in your EA:

//----
extern int SetHour   = 0;                 //Optimization starting hour 
extern int SetMinute = 1;                 //Optimization starting minute 
int    TestDay       = 3;                 //Number of days for optimization
int    TimeOut       = 4;                 //Optimization end timeout in minutes
string NameMTS       = "Expert_Name";     //EA's name
string NameFileSet   = "SetFileName.set"; //Name of the Set-file with the settings
string PuthTester    = "PathTester";      //Path to the tester
//--- Filtering order
int    Gross_Profit   = 1;                //Sorting by Maximal profit
int    Profit_Factor  = 2;                //Sorting by Maximal profit factor
int    Expected_Payoff= 3;                //Sorting by Maximal expected payoff
//--variable names for optimization
string Per1 = "variables_1";
string Per2 = "variables_2";
string Per3 = "variables_3";
string Per4 = "variables_4";
bool StartTest=false;
datetime TimeStart;
//--- Include the auto optimizer library
#include <auto_optimization.mqh>
 
//----
The code to insert in the start() function
//----
// Not to be launched at testing and optimizing   
if(!IsTesting() && !IsOptimization())
  {
    // Compare the current hour with that preset for launching
    if(TimeHour(TimeLocal()) == SetHour)
      {
        // Protection against restarting
        if(!StartTest)
          {
            // Compare the minute range to the minute preset for launching
            if(TimeMinute(TimeLocal()) > SetMinute - 1)
              { 
                // the range is necessary, if for some reason 
                // no new tick is available for a long time
                if(TimeMinute(TimeLocal()) < SetMinute + 1)
                  {
                    TimeStart = TimeLocal();
                    StartTest = true;   // Flag of tester launching
                    Tester(TestDay, NameMTS, NameFileSet, PuthTester, TimeOut, 
                           Gross_Profit, Profit_Factor, Expected_Payoff, Per1, 
                           Per2, Per3, Per4);
                  }
              }
          }
      }
    variables_1 = GlobalVariableGet(Per1);
    variables_2 = GlobalVariableGet(Per2);
    variables_3 = GlobalVariableGet(Per3);
    variables_4 = GlobalVariableGet(Per4);
  }
// If the tester launching is flagged
if(StartTest)
  {
    // If more time has elapsed the launching than it was set 
    // to be the test waiting time
    if(TimeLocal() - TimeStart  > TimeOut*60)
      {
        StartTest = false;  // Zero the flag
      }
  }
//----
Added the auto optimizer library modified for the 204 Build -а  auto_optimization_204.mqh 
Accordingly, the code for calling the library will be as follows
//--- Include the auto optimizer library
#include <auto_optimization_204.mqh>

MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/7090

s_wininet s_wininet

Example of using wininet.dll for downloading a web page.

The WaveMarker script set The WaveMarker script set

A set of scripts for quick drawing the Elliott waves.

Converting hst-files into csv files Converting hst-files into csv files

The hst2csv script is used for converting *.hst files to *.csv files, that can be imported into the MetaTrader 4 client terminal with no errors.

History analysis on presence of holes and gaps History analysis on presence of holes and gaps

The history_data_analysis_v3 script checks the history for missing bars, determines the size of the holes, gaps and makes a list of them.