function [net] = mytrainsystem(training_input, training_target,buysignal);

p = training_input;
T = training_target;
f = buysignal;
Pi = 0.1;
Ai = 0.1;


net = newff([min(min(p)) max(max(p))],[70 80 1],{'tansig' 'purelin' 'purelin'},'trainrp');
net.numInputs=10;
net.initFcn='initlay';
net.layers{1}.initFcn='initnw';
net.layers{2}.initFcn='initnw';
net.inputWeights{1,1}.initFcn='rands';
net.layerWeights{1,2}.initFcn='rands';
net.biases{1}.initFcn='rands';
net.biases{2}.initFcn='rands';
net = init(net);
net.performFcn = 'mse';
net.trainParam.mc=.95
net.trainParam.lr=.05
net.trainParam.show = 100;
net.trainParam.epochs =2500;
net.trainParam.goal = .01;


[net, tr] = train(net,p,T);
return; 
%Y = sim(net,p);

