oi() Series Functions
The oi() function is used to create a Series Object of the open interest values or to retrieve individual open interest values.
Syntax
oi( [ nBarIndex ][, sym() | inv() ] )
Parameters
Parameter: | Description: | Default: |
nBarIndex | [Optional] Number of bar index of series to retrieve | n/a |
sym() or inv() | [Optional] Function of sym() or inv() to determine source for oi values. | n/a |
Return Value(s)
Returns a Series Object when nBarIndex is not specified.
Returns a single price value when nBarIndex is specified.
Notes
Only valid with futures and options contracts.
Code Examples
function main() {
//retrieve the value for the current bar
myVar =oi
(
0
)
;
//retrieve the value for the previous bar
myVar =oi
(
-1
)
;
//retrieve the current value for a specific symbol
myVar = oi
(
0
,
sym("IBM")
)
;
//retrieve the current value for a specific symbol/interval
myVar =oi
(
0
,
sym("IBM,5")
)
;
//retrieve the current value for a specific bar interval
myVar =oi
(
0
,
inv(15)
)
;
//create a Series Object of the oi values.
xOi =oi
()
;
//create a Series Object of the oi values for a specific symbol.
xOi =oi
(
sym("IBM")
)
;
//create a Series Object of the oi values for a specific symbol/interval.
xOi =oi
(
sym("IBM,5")
)
;
//create a Series Object of the oi values for a specific interval.
xOi =oi
(
inv(15)
)
;
}
See Also
Series Functions
eSignal Bulletin Board Search Engine
Help Guides and Tutorials