getSeries()

eSignal EFS 2

getSeries()

Top  Previous  Next

 

getSeries( returnVal, seriesIndex )

 

New in EFS2. This function converts the return value of a data series back into a series object.

 

Parameters

 

returnVal

the return value to convert

seriesIndex

optional. index into array of return values. default value is 0

 

Usage

 

var myStudy1 = null;

var myStudy2 = null;

var bInit = false;

 

function main() {

 

       if ( bInit == false ) {

               

               //create a 20-period EMA using 30-min bars

               myStudy1 = ema( 20, inv(30) );

 

               //create a 20-period EMA using 60-min bars

               myStudy2 = ema( 20, inv(60) );

 

               bInit = true;

 

       }

 

       //use getSeries() to assure that the actual series is being returned, rather than the values

       return new Array( getSeries( myStudy1 ), getSeries( myStudy2 ) );

 

}