efsExternal()

eSignal EFS 2

efsExternal()

Top  Previous  Next

 

efsExternal( pathToEFS [, sym/inv] [, parameters] )

 

New in EFS2. Returns a series object representing the values as calculated from the given external EFS script. You would then use the getSeries() function to extract a specific series value if multiple series are returned.

 

Parameters

 

pathToEFS

the path and filename of the EFS script to call

sym/inv

optional. if used, the external EFS will be loaded into the specified symbol or interval's context

parameters

optional. parameters, if any, required by the EFS script you are calling

 

Usage

 

function main() {

var myVar;

var myPlot;

 

       ...

       ...

 

       //call an external EFS called "myCustomEFS.efs" and load it into

       //the context of IBM 15-min bars. we also pass two parameters

       //to the script.

       myVar = efsExternal( "myCustomEFS.efs", sym( "IBM,15" ), 20, 5 );

 

       //assuming that "myyCustomEFS.efs" returned 3 values, we would use

       //the following logic to retrieve just the 2nd return value. The first

       //value returned would be seriesIndex 0, second value would be

       //seriesIndex 1, etc.

       var myPlot = getSeries( myVar, 1 );

 

 

 

}

 

 

efs()