efsInternal()

ICE Data Services -

efsInternal() Series Functions

Returns a series object representing the values calculated from a given function name. The function specified will be executed as if it were a main() function being called in an external EFS. This is conceptually the same as the efsExternal() function, the difference being that instead of calling an external file's main() function, the engine will call the user-defined function instead.

Syntax
efsInternal( sFunctionName [, parameters ][, sym() | inv() ] )

Parameters
Parameter: Description: Default:
sFunctionName Required. 
String of the internal function name to be used.

 

n/a parameters [Optional]  Function parameters separated by commas that are expected by the called function (if any).

 

n/a sym() or        inv() [Optional]  Function of sym() or inv() to determine source for series' return values.

 

n/a
Return Value(s)
Returns a Series Object or an array of Series Objects.

Notes
This function in only available in version 7.9 (build 719) or later.

This function is not compatible with setComputeOnClose() or the global set compute on close option listed in EFS Settings (Tools-->EFS-->Settings).

If function parameters are being passed, all parameters must be passed that the function is expecting.

For a code example used to access the individual Series Objects that are returned in an array from efsInternal(), see getSeries().


Code Examples

var xStudy = null;function main() {    //call a user-defined function as an input source to an ema    if (xStudy == null) xStudy = ema( 20, efsInternal( "myCustomFunction", 5, close() ) );    return xStudy.getValue(0);} //user-defined function. our function accepts two parameters and //note that the series is passed as the last parameter. function myCustomFunction( length, source ) {    return( source.getValue(0) - source.getValue(-length) ); }


See Also
Series Functions
eSignal Bulletin Board Search Engine
Help Guides and Tutorials