OS_CheckProx (Function)
The OS_CheckProx function checks to see if the target strike price is within the proximity specified. This function is designed for OptionStation.
Syntax
OS_CheckProx(OptType, OptExpDate, InOrOut01, Prox, CheckStrike);
Returns (Boolean)
True if the target strike price is within the proximity specified, otherwise False if not found.
Parameters
|
Name |
Type |
Description |
|
OptType |
Numeric |
Option type is a numerical value of either 0 or 2 for a Put, or 1 or 3 for a Call. |
|
OptExpDate |
Numeric |
Sets the target expiration date. |
|
InOrOut01 |
Numeric |
Sets whether the function should check if option is in-the-money or out-of-the money ( 0 = In-the-Money, 1 = Out-of-the-Money) |
|
Prox |
Numeric |
Sets the number of strikes to use for proximity test. |
|
CheckStrike |
Numeric |
Sets the strike price to test. |
Remarks
This function is used in many OptionStation search strategies to allow the user to filter out strikes too far in or out of the money in position search.
Example
Assigns Condition1 to true if the strike price is within the proximity for a 100 Call option, that is 3 strikes or less in the money.
Condition1 = OS_CheckProx(Call, ExpirationDate of Option, 1, 3, 100);