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

Expert History Export - MetaTrader 5용 라이브러리

조회수:
2236
평가:
(31)
게시됨:
2022.04.09 17:23
업데이트됨:
2022.06.29 11:52
\MQL5\Include\
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Adds the ability to automatically export the history of deals after running an Expert Advisor in the Strategy Tester.

The file is saved in the shared terminal folder   Common/Files or in the terminal folder   MQL5/Files.

The file name is generated automatically or set manually when calling the method   Export()

The history file can be used to simulate the same sequence of trades on another trading server using an EA Simple History Receiver .


Basic usage

1. Instantiate the object in the global scope:

CExpertHistory expertHistory();

2. Add to the function call   OnTester() method call   Export()   :

double OnTester(void) {

    ...

    expertHistory.Export();

    ...

}


Extended use

1. Instantiate the object in the global scope:

string expertName = "SomeExpert";

string expertVersion = "1.00";     // Not required


CExpertHistory expertHistory(expertName, expertVersion);


2. Add to function   OnInit()   any pairs of parameter names and values:

input double SL = 500;

input double TP = 1000;


int OnInit() {

    ...

    expertHistory.AddParam("Symbol", Symbol());

    expertHistory.AddParam("TP", TP);

    expertHistory.AddParam("SL", SL);

    ...

}


3. Add to the function call   OnTester() method call   Export() :

 double OnTester(void) {

     ...

     if(!MQLInfoInteger(MQL_OPTIMIZATION)) { // If you want save history only in single tester run

         expertHistory.Export();

     }

     ...

}


At the method   Export()   there are options:

void Export(
   string export FileName = "", // The name of the file to export. If empty, it will be generated according to the exportFileNameFormat parameter

   ENUM_HISTORY_EXPORT_FORMAT exportFormat = HEF_INI_FULL, // Export format. By default, in the file in addition to the transactions
                                                           // account parameters are recorded, testing period, max. drawdown and so on.

   ENUM_HISTORY_FILENAME_FORMAT exportFileNameFormat = HFF_FULL, // File name format. By default, the file name includes the server name, the testing period, max. drawdown and so on.

   int commonFlag=FILE_COMMON // Save a file to a shared terminal folder. If it is equal to 0, then save to a non-shared folder.
);



Account History Export Account History Export

Export the history of transactions on the trading account.

MA plus MA plus

Standard MA + Hull MA + DEMA + TEMA

Extending the Rectangle Extending the Rectangle

An indicator to monitor the appearance (or change) of a rectangle whose name starts with ...

CHO Smoothed Arrow CHO Smoothed Arrow

Signals (Arrow objects) of iCHO indicator (Chaikin Oscillator, CHO) and smoothed iCHO intersections