Hi,
Can someone point me to some examples of using [more than once, very important] efsInternal to the same function, who's parameters are other internal functions?
Example:
var st1 = rsi(3, efsInternal("rOsc",rMA5,rMA10));
var st2 = rsi(3, efsInternal("rOsc",rMA10,rMA20));
var st3 = rsi(3, efsInternal("rOsc",rMA20,rMA50));
where:
function rOsc(,rFast,rSlow) {return rFast(0)-rSlow(0);}
and:
function rMA5() {return stMA5.getValue(0)*5;}
function rMA10() {return stMA10.getValue(0)*10;}
function rMA20() {return stMA20.getValue(0)*20;}
function rMA50() {return stMA50.getValue(0)*50;}
and of course stMA5,stMA10,stMA20,stMA50 are properly declared.
The above example works fine if I use hard coded rsi function [internally], but it is slow. With efsInternal I get the same plot [the last declared]. If I use diferent length for rsi, i get three diferent plots.
Note: We went through something similar before, but it was blamed on EFS1 at the time.
Here, I suspect it has to do with the way EFS engine runs series, one at a time, at ALLBARS, which may require that ALL PARAMETERS of efsInternal to be already declared data series, case when I can't use it.
If someone who understands the internals of the efs engine can clarify this issue, it would be greatly appreciated.
Thank you.
Can someone point me to some examples of using [more than once, very important] efsInternal to the same function, who's parameters are other internal functions?
Example:
var st1 = rsi(3, efsInternal("rOsc",rMA5,rMA10));
var st2 = rsi(3, efsInternal("rOsc",rMA10,rMA20));
var st3 = rsi(3, efsInternal("rOsc",rMA20,rMA50));
where:
function rOsc(,rFast,rSlow) {return rFast(0)-rSlow(0);}
and:
function rMA5() {return stMA5.getValue(0)*5;}
function rMA10() {return stMA10.getValue(0)*10;}
function rMA20() {return stMA20.getValue(0)*20;}
function rMA50() {return stMA50.getValue(0)*50;}
and of course stMA5,stMA10,stMA20,stMA50 are properly declared.
The above example works fine if I use hard coded rsi function [internally], but it is slow. With efsInternal I get the same plot [the last declared]. If I use diferent length for rsi, i get three diferent plots.
Note: We went through something similar before, but it was blamed on EFS1 at the time.
Here, I suspect it has to do with the way EFS engine runs series, one at a time, at ALLBARS, which may require that ALL PARAMETERS of efsInternal to be already declared data series, case when I can't use it.
If someone who understands the internals of the efs engine can clarify this issue, it would be greatly appreciated.
Thank you.
Comment