OMX_INITPASS1
Previous  Top  Next

Prototype:

int OMX_INITPASS1( 
Long IterationNum, Long GenerationNum, Long IndividualNum, char *Symbol, float PriceScale, Long BarNum, Long BarType, Long BarInterval, Long BarDate, Long BarTime, Long LastCalcDate, Long LastCalcTime ) ;  

Purpose:
This function initializes an optimization pass from within the strategy stores the passed values for Optimax to later display as an equity graph.

Parameters:
IterationNum
A positive integer or 0. This tells Optimax which pass to process. Iteration numbers must be non-repeating sequential integers. When 0, this tells Optimax that an optimization is not in process.
GenerationNum
The generation number of an individual to be processed. Always pass 0 during an optimization. Passing a non-zero value indicates that this is a setup request and the next calls will be GetParm requests for historic G/I input values.
IndividualNum
The number of an individual within a generation to be processed. Always pass 0 during an optimization. Passing a non-zero value indicates that this is a setup request and the next calls will be GetParm requests for historic G/I input values.
Symbol
The name of the current symbol
PriceScale
The price scale of the current price series
BarNum
The current bar number
BarType
The bar type identified by TradeStation using the BarType variable.
BarInterval
The bar interval identified by TradeStation using the BarInterval variable.
BarDate
The date on the current bar in EasyLanguage format.
BarTime
The time on the current bar in EasyLanguage format.
LastCalcDate
The date on the last bar of the chart in EasyLanguage format.
LastCalcTime
The time on the last bar of the chart in EasyLanguage format.
 

Returns:

-1  
Number of iterations has exceeded max number of permutations - normal end of run  
0  
the pass could not be initialized; possibly due to a function call sequence error or inability to open necessary output files.  
1  
success  
 

Use:
Call this function on the first bar of a strategy pass. It performs all initialization functions necessary for the optimization of that pass.

Notes:
None.