Well, I guess that's exactly what I tried to do in the first version of the code I posted here (see my very first post above):
int size = optimize(50,10,100);
Rset("Data",rev(seriesC(),size),size); // send Close series to RIt makes complete sense to do it like that, but... it does not work. No training is happening.
What am I missing here?