The strategy profile initialization


The Init() function of the strategy is called once, when the host application has just loaded the strategy into the memory. In this function the strategy must create profile. Profile is the information which is required for creation of the strategy: strategy name and description and parameters.

When the function is being executed, there is a global variable called strategy. You must use the table kept in this variable to provide all necessary information.

Note: Values of any global variables, which are defined in the Init() function will not be available in the other strategies functions. Because the user can apply multiple instance of the same strategy at the same time, the new instance of the strategy is created every time when the user applies the strategy.