getSecond()

eSignal EFS 2

getSecond()

Top  Previous  Next

 

getSecond( barIndex [, numBars] [, symbol] )

 

Returns the second at the specified bar index.

 

Parameters

 

barIndex

bar index of series to retrieve

numBars

optional. number of bars of data to return

symbol

optional. specify a symbol to use

 

Usage

 

function main() {

 

       ...

       ...

       //retrieve the value for the current price bar

       myVar = getSecond(0);

       //retrieve the value for the previous price bar

       myVar = getSecond(-1);

       //retrieve the value for a specific symbol

       myVar = getSecond(0, "IBM" );

       //retrieve the last 20 values into an array

       myArray = getSecond( 0, -20 );

 

 

}