According to this thread one cannot use callFunction() to retrieve individual values from a returned array in the called efs.
In fact if I use the following efs
to call the returned array in the attached MAofCCI.efs (that I have in the Builtin folder) I get an error as can be seen in the following image.
Switching call() in place of callFunction() (Lines 10 and 11) then allows me to retrieve the values in the array of the called efs as shown in the following image.
and even to retrieve them individually as shown in the next image.
As an aside not only do both plots of MAofCCI.efs appear but also the bands set by addBand in the called efs. Would not mnind knowing why but it is beside the issue I am trying to solve.
(continues on next message)
In fact if I use the following efs
PHP Code:
function preMain() {
setPriceStudy(false);
setStudyTitle("Call-CallFunction test");
setDefaultBarFgColor(Color.blue,0);
setDefaultBarFgColor(Color.red,1);
}
function main() {
var test = new Array(2);
test = callFunction("/Builtin/MAofCCI.efs","main");
//test = call("/Builtin/MAofCCI.efs");
test1=test[0];
test2=test[1];
return new Array(test1,test2);
}
Switching call() in place of callFunction() (Lines 10 and 11) then allows me to retrieve the values in the array of the called efs as shown in the following image.
and even to retrieve them individually as shown in the next image.
As an aside not only do both plots of MAofCCI.efs appear but also the bands set by addBand in the called efs. Would not mnind knowing why but it is beside the issue I am trying to solve.
(continues on next message)
Comment