efsInternal() |
Top Previous Next |
efsInternal( functionName [, parameters... ] )
New in EFS2. 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 efs() function, the difference being that instead of calling an external file's main() function, the engine will call the user-defined function instead.
Parameters
Usage
function main() { var myVar;
... ...
//call a user-defined function as an input source to an ema myVar = ema( 20, efsInternal( "myCustomFunction", 5, close() ) );
}
//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) ); } |