Thanks, I think I'm catching on. If I understood you correctly, something like this would be the 'official' way to use the NEURAL function (obviously the code is truncated to show only the relevant functions):

Code:
{
  if(mode == NEURAL_TRAIN) {
	file_write("Data\\signals.csv",Data,0); // export batch training data to R
    Rx(strf("Data <- read.csv('%sData/signals.csv',header=F)",slash(ZorroFolder)));

if(!Rx("modellist[[model+1]] <- train(Data[, c(1,2)], Data[, 20], method = 'knn')) return 0;  
if(!Rx("modellist[[model+1]] <- train(Data[, c(1,2)], Data[, 20], method = 'rf')) return 0;

...
}



while(asset(loop("AUD/USD", "EUR/USD")))
while(algo(loop("knn", "rf"))) {
	if (Algo == 'knn') {
		adviseLong(NEURAL....);
	}
	if (Algo == 'rf') {
		adviseLong(NEURAL....);
	}
}



Will the two calls to the adviseLong() function work as I expect them to in the case above? That is, will the "model" parameter be incremented in both function calls?

Last edited by boatman; 01/14/16 09:33.