MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Automated Trading Language Documentation

MQL5 Wizard: How to Create a Module of Trailing of Open Positions MQL5 Wizard: How to Create a Module of Trailing of Open... Subscribe to signal
SoMM 3K
80.59%, 22 278.18 USD
Analyzer SignalsAnalyzer Signals Try product
Analyzer Signals
Author: dupter
Screenshot
CrudeOIL, H4
Demo
Exp_XRVI Expert Advisor
Exp_XRVI
Author: GODZILLA
MQL5 ReferenceWorking with Optimization Results 

Working with Optimization Results

Functions for organizing custom processing of the optimization results in the strategy tester. They can be called during optimization in testing agents, as well as locally in Expert Advisors and scripts.

When you run an Expert Advisor in the strategy tester, you can create your own data array based on the simple types or simple structures (they do not contain strings, class objects or objects of dynamic arrays). This data set can be saved using the FrameAdd() function in a special structure called a frame. During the optimization of an Expert Advisor, each agent can send a series of frames to the terminal. All the received frames are written in the file *.MQD in the folder terminal_directory/MQL5/Files/Tester expert named as the Expert Advisor. They are written in the order they are received from the agents. Receipt of a frame in the client terminal from a testing agent generates the TesterPass event.

Frames can be stored in the computer memory and in a file with the specified name. The MQL5 language sets no limitations on the number of frames.

Function

Action

FrameFirst

Moves a pointer of frame reading to the beginning and resets the previously set filter

FrameFilter

Sets the frame reading filter and moves the pointer to the beginning

FrameNext

Reads a frame and moves the pointer to the next one

FrameInputs

Receives input parameters, on which the frame is formed

FrameAdd

Adds a frame with data

ParameterGetRange

Receives data on the values range and the change step for an input variable when optimizing an Expert Advisor in the Strategy Tester

ParameterSetRange

Specifies the use of input variable when optimizing an Expert Advisor in the Strategy Tester: value, change step, initial and final values

See also

Testing Statistics, Properties of a Running MQL5 Program


Updated: 2012.08.09