Thanks, good idea.
Unfortunatelly I get an error in the testing phase after training.

The following is my neural script:

Code:
library('deepnet', quietly = T) 
library('caret', quietly = T)


neural.train = function(model,XY) 
{
  XY <- as.matrix(XY)
  X <- XY[,-ncol(XY)]
  Y <- XY[,ncol(XY)]  
  Y <- ifelse(Y > 0,1,0)
  prepr<-preProcess(X, method = "spatialSign")
  x.tr<-predict(prepr, X)   
  Preprs[[model]] <<- prepr
  Models[[model]] <<- sae.dnn.train(x.tr,Y,
      hidden = c(50,50,50), 
      activationfun = "tanh", 
      learningrate = 0.7, 
      momentum = 0.5, 
      learningrate_scale = 1.0, 
      output = "sigm", 
      sae_output = "linear", 
      #numepochs = 300, 
      batchsize = 100,
      hidden_dropout = 0, 
      visible_dropout = 0)
}

neural.predict = function(model,X) 
{
  if(is.vector(X)) X <- t(X)
  x.ts<-predict(Preprs[[model]], X)
  return(nn.predict(Models[[model]], x.ts))
}

neural.init = function()
{
  set.seed(365)
  Models <<- vector("list")
  Preprs <<- vector("list")
}

neural.save = function(name)
{
  save(Models,Preprs,file=name)  
}

neural.load = function(name)
{
  load(Models,Preprs,file=name)  
}



even if I remove "neural.load" (not sure if I need it) I always get the following error:

Code:
Load DeepLearnSAE2.4_EURUSD_2.ml
R error -  
Error in newdata[, object$method$center, drop = FALSE] : 
  attribute 'dimnames' missing for array
Calls: neural.predict -> predict -> predict.preProcess -> sweep
Execution stopped
 
Profit 8$  MI 2$  DD 23$  Capital 100$
Trades 596  Win 52.2%  Avg +0.1p  Bars 2
AR 27%  PF 1.06  SR 0.64  UI 38%  R2 0.00
Quit
Time 00:01:16



If I run a TestOOS() from R, it works.
I am not sure where it is the error.
What do you think?