GetNextOTMOption

GetNextOTMOption ( String optionCode);

Default values:

optionCode: Option code

Input parameters

Parameter Default value Description
optionCode - Defines the input option.

Description

Returns the code of the next option in the same series as the input one. For a Put option, the code of the next option with lower strike will be returned; for a Call option, this function will return the code of the next option with higher strike.

Note that, despite the function name, the code of the next option in out-of-the-money direction is returned, which is not necessarily an out-of-the-money option.

Example

AddLabel(yes, "Next OTM option is" + GetNextOTMOption(".GOOG120317C580"));

This script adds a chart label showing the code of the next Call option for Google in the series with expiration date March 17, 2012, whose strike price is higher than that of the specified one ($580).