Optimization Algorithm Scripts
Optimization Algorithm scripts are used to control the optimization process. During optimization the Desktop and its strategies will be backtested repeatedly with different optimization vectors (script parameter values) as selected by the Optimization Algorithm script.
Setup
An Optimization Algorithm script can be set up from the Optimization Settings Window of the Desktop.
Functions
Name |
Description |
This function is used for accepting the script parameters and for initializing the script prior to all other function calls. Once the script is assigned to a Desktop, its parameter values can be specified by the user. |
|
This function is called in order to select the next optimization vectors to be processed. The function may be called multiple times in a row before the OnUpdateOptimizationVector function is called. |
|
This function is called to get the number of optimization vectors that the algorithm will select and run if the optimization process runs to completion. |
|
This function is called to notify the optimization algorithm that a vector has been processed. |
|
This function is called when the script is shutdown. |
Function Details
OnInitialize() |
This function is used for accepting the script parameters and for initializing the script prior to all other function calls. Once the script is assigned to a Desktop, its parameter values can be specified by the user. |
int[] OnSelectNextOptimizationVectors() |
This function is called in order to select the next optimization vectors to be processed. The function may be called multiple times in a row before the OnUpdateOptimizationVector function is called. Returns The indexes of the next optimization vectors to process. |
int OnGetMaxVectors() |
This function is called to get the number of optimization vectors that the algorithm will select and run if the optimization process runs to completion. Returns The maximum number of optimization vectors to be run. |
OnUpdateOptimizationVector(int vectorIndex) |
||||||
This function is called to notify the optimization algorithm that a vector has been processed. Parameters
|
OnShutdown() |
This function is called when the script is shutdown. |