Download MetaTrader 5
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 *.MQD file named as the Expert Advisor in the terminal_directory\MQL5\Files\Tester folder. 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: 2015.12.03