OS_MaxNumStrikes (Function)

image\trumpet2.gif Disclaimer

The OS_MaxNumStrikes function returns the maximum number of in- and out-of-the-money options based on the given series and option type. This function is designed primarily for use with OptionStation.

Syntax

OS_MaxNumStrikes(OptType, TargetExpDate, oIn, oOut);

Returns (Double)

The oIn and oOut output parameters return the maximum number of in-the-money and out-of-the money options for a given series and option type.  The OS_MaxNumStrikes function itself returns a value of 0 if successful, and -1 otherwise.

Parameters

Name

Type

Description

OptType

Numeric

Sets if it is a Put or Call option.  Put or 2 = Puts; Call or 3 = Calls.

TargetExpDate

Numeric

Sets the expiration date of the option in Julian Date format.

oIn

Numeric

Outputs the maximum number of in-the-money options based on the given series and option type.

oOut

Numeric

Outputs the maximum number of out-of-the-money options based on the given series and option type

Example

Sets the variables Value2 and Value3 to the number of strikes In and Out of the money for a given option type and series.

Value1 = OS_MaxNumStrikes(Call, ExpirationDate of Option, oIn, oOut);

Value2 = oIn;

Value3 = oOut;