volume() | Series Functions |
The volume() function is used to create a Series Object of the volume values or to retrieve individual volume values.
Syntax
volume( [ nBarIndex][, sym() | inv()] )
Parameters
Parameter: Description:Default:
n/asym() or inv() [Optional] Function of sym() or inv() to determine source for volume values.
n/a
Return Value(s)
Returns a Series Object whennBarIndex is not specified.
Returns a single price value when nBarIndexis specified.
Notes
N/A
Code Examples
function main() {
//retrieve the value for the current price bar
myVar =volume
(
0
)
;
//retrieve the value for the previous price bar
myVar =volume
(
-1
)
;
//retrieve the current value for a specific symbol
myVar =volume
(
0
,
sym("IBM")
)
;
//retrieve the current value for a specific symbol/interval
myVar =volume
(
0
,
sym("IBM,5")
)
;
//retrieve the current value for a specific bar interval
myVar =volume
(
0
,
inv(15)
)
;
//create a Series Object of the volume prices.
xVolume =volume
()
;
//create a Series Object of the volume prices for a specific symbol.
xVolume =volume
(
sym("IBM")
)
;
//create a Series Object of the volume prices for a specific symbol/interval.
xVolume =volume
(
sym("IBM,5")
)
;
//create a Series Object of the volume prices for a specific interval.
xVolume =volume
(
inv(15)
)
;
}
See Also
Series Functions
eSignal Bulletin Board Search Engine
Help Guides and Tutorials