GetNextITMOption ( 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 higher strike will be returned; for a Call option, this function will return the code of the next option with lower strike.
Note that, despite the function name, the code of the next option in in-the-money direction is returned, which is not necessarily an in-the-money option.
Example
AddLabel(yes, "Next ITM option is" + GetNextITMOption(".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 lower than that of the specified one ($580).