I want to run a master script which will call a number of efs scripts on each bar of data once only and then break when the first script returns a success. However, it seems that each time I call an efs script using efsExternal() the script is run for the whole set of data instead of just the single bar that it has been called from.
Do I need to specify the exact bar and the symbol when I call the script or is there a way of having the called script run for just the one bar of data that the calling script is referring to?
Do I need to specify the exact bar and the symbol when I call the script or is there a way of having the called script run for just the one bar of data that the calling script is referring to?
PHP Code:
for (x = 0; x < aList.length; x++) {
vStrat_result = efsExternal(aStrategies[x][script_name],aStrategies[x][open_position],aStrategies[x][price],aStrategies[x][stop_price]);
// scripts return array of (open_position, price, stop_price, traded)
for (y = 1;y < 4; y++) {
aStrategies[x][y] = getSeries(vStrat_result,y-1);
}
if (aStrategies[x][1] > 0)
var t = openStrats.push(x);
// if script traded the don't run other scripts
if (getSeries(vStrat_result,3) == 1) {
break;
}
Comment