OMX_PRICEMOD1
Previous  Top  Next

Prototype:

int OMX_PRICEMOD1( 
int bUseFindAddr, Long IterationNum, Long GenerationNum, Long IndividualNum, LPLONG lpOpen1, LPLONG lpHigh1, LPLONG lpLow1, LPLONG lpClose1, LPLONG lpOpen2, LPLONG lpHigh2, LPLONG lpLow2, LPLONG lpClose2, char *Symbol, float PriceScale, Long BarNum, Long BarType, Long BarInterval, Long BarDate, Long BarTime, Long LastCalcDate, Long LastCalcTime ) ;  

Purpose:
This function modulates OHLC values on datastream1 according to the parameters specified in the price modulation options of Optimax.

Parameters:
bUseFindAddr
0 = use the TradeStation FindAddress functions before modifying the prices.
1 = do not use the FindAddress functions - use the passed addresses directly
IterationNum
The current iteration number during an optimization, or 0 if not optimizing.
GenerationNum
The generation number of the historic individual to be processed. Always pass 0 during an optimization. Passing a non-zero value indicates that this is a historic request and previous price values are returned.
IndividualNum
The individual number within a generation of the historic individual to be processed. Always pass 0 during an optimization. Passing a non-zero value indicates that this is a historic request and previous price values are returned.
lpOpen1
Address of the Open price on datastream1 for the current bar.
lpHigh1
Address of the High price on datastream1 for the current bar.
lpLow1
Address of the Low price on datastream1 for the current bar.
lpClose1
Address of the Close price on datastream1 for the current bar.
lpOpen2
Address of the Open price on a secondary datastream for the current bar.
lpHigh2
Address of the High price on a secondary datastream for the current bar.
lpLow2
Address of the Low price on a secondary datastream for the current bar.
lpClose2
Address of the Close price on a secondary datastream for the current bar.
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:
This function always returns 1.

Use:
Call this function on every bar during an optimization. This function accepts unmodulated prices from a second datastream and modulates the prices on datastream1. The second datastream values are used as reference values and are copied to the OHLC values on datastream1 (parameters 5 through 8) before modulation.

Notes:
This function can also be used for the manual price modulation function.