Better NN EA development - page 37

 

svm best param

Best c=8.0, g=2.0 CV rate=87.6884

 

svm best param

Best c=32.0, g=2.0 CV rate=87.5628

 

svm best param

Best c=32.0, g=2.0 CV rate=87.9397

 

New dll:

/+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

#import "Project3_1.dll"

int Train(

double t[],//iTime(NULL,TrainTimeFrame,i);

double c[],//iClose(NULL,TrainTimeFrame,i);

double l[],//iLow(NULL,TrainTimeFrame,i);

double h[],//iHigh(NULL,TrainTimeFrame,i);

int NrTrainBars,

int FutureWindow,

int StopLoss,

int TakeProfit,

double Point1,

double &train_result[],//output

double &train_time[]//output

);

int SvmCreateDyn_3tf_1(

double t[],//iTime(NULL,TrainTimeFrame,i);

double c[],//iClose(NULL,TrainTimeFrame,i);

double l[],//iLow(NULL,TrainTimeFrame,i);

double h[],//iHigh(NULL,TrainTimeFrame,i);

double ma5_M5[],//iMA(NULL,PERIOD_M5,5,0,MODE_SMA,PRICE_CLOSE,i);

double ma10_M5[],//iMA(NULL,PERIOD_M5,10,0,MODE_SMA,PRICE_CLOSE,i);

double ma15_M5[],//iMA(NULL,PERIOD_M5,15,0,MODE_SMA,PRICE_CLOSE,i);

double ma5_H1[],

double ma10_H1[],

double ma15_H1[],

double ma5_H4[],

double ma10_H4[],

double ma15_H4[],

int NrTrainBars,

int NrAttrib,

int FutureWindow,

int StopLoss,

int TakeProfit,

double Point1,

string file_name1//="c:\\trade_model_dyn_3tf_1_.txt";

);

int SvmCreateDyn_3tf_1_par(

double t[],//iTime(NULL,TrainTimeFrame,i);

double c[],//iClose(NULL,TrainTimeFrame,i);

double l[],//iLow(NULL,TrainTimeFrame,i);

double h[],//iHigh(NULL,TrainTimeFrame,i);

double ma5_M5[],//iMA(NULL,PERIOD_M5,5,0,MODE_SMA,PRICE_CLOSE,i);

double ma10_M5[],//iMA(NULL,PERIOD_M5,10,0,MODE_SMA,PRICE_CLOSE,i);

double ma15_M5[],//iMA(NULL,PERIOD_M5,15,0,MODE_SMA,PRICE_CLOSE,i);

double ma5_H1[],

double ma10_H1[],

double ma15_H1[],

double ma5_H4[],

double ma10_H4[],

double ma15_H4[],

int NrTrainBars,

int NrAttrib,

int FutureWindow,

int StopLoss,

int TakeProfit,

double Point1,

string file_name1,//="c:\\trade_model_dyn_3tf_1_.txt";

double C=1, //C

double g=0 //gamma

);

int SvmPredictDyn_3tf_1(

double ma5_M5[],//iMA(NULL,PERIOD_M5,5,0,MODE_SMA,PRICE_CLOSE,i);

double ma10_M5[],//iMA(NULL,PERIOD_M5,10,0,MODE_SMA,PRICE_CLOSE,i);

double ma15_M5[],//iMA(NULL,PERIOD_M5,15,0,MODE_SMA,PRICE_CLOSE,i);

double _ma5_H1[],

double _ma10_H1[],

double _ma15_H1[],

double _ma5_H4[],

double _ma10_H4[],

double _ma15_H4[],

int NrTestBars, //

int NrAttrib, //

double Point1,

string model_file_name_1,

double &ptr_predict_label__1[]//output label

);

int SvmCreateDyn_3tf_1_In(

double t[],//iTime(NULL,TrainTimeFrame,i);

double c[],//iClose(NULL,TrainTimeFrame,i);

double l[],//iLow(NULL,TrainTimeFrame,i);

double h[],//iHigh(NULL,TrainTimeFrame,i);

double ma5_M5[],//iMA(NULL,PERIOD_M5,5,0,MODE_SMA,PRICE_CLOSE,i);

double ma10_M5[],//iMA(NULL,PERIOD_M5,10,0,MODE_SMA,PRICE_CLOSE,i);

double ma15_M5[],//iMA(NULL,PERIOD_M5,15,0,MODE_SMA,PRICE_CLOSE,i);

double ma5_H1[],

double ma10_H1[],

double ma15_H1[],

double ma5_H4[],

double ma10_H4[],

double ma15_H4[],

int NrTrainBars,

int NrAttrib,

int FutureWindow,

int StopLoss,

int TakeProfit,

double Point1,

string file_name1,//="c:\\trade_model_dyn_3tf_1_.txt";

int fl=0, //==0 normalize

int ftype=0, //==0 file type = libsvm , ==1 csv without header, ==2 = csv for Neuro Solution

int create=0 //create==0 don't create model

);

int SvmPredictDyn_3tf_1_Out(

double _ma5_M5[],//iMA(NULL,PERIOD_M5,5,0,MODE_SMA,PRICE_CLOSE,i);

double _ma10_M5[],//iMA(NULL,PERIOD_M5,10,0,MODE_SMA,PRICE_CLOSE,i);

double _ma15_M5[],//iMA(NULL,PERIOD_M5,15,0,MODE_SMA,PRICE_CLOSE,i);

double _ma5_H1[],

double _ma10_H1[],

double _ma15_H1[],

double _ma5_H4[],

double _ma10_H4[],

double _ma15_H4[],

int NrTestBars, //

int NrAttrib, //

double Point1,

string model_file_name_1,

double &ptr_predict_label__1[],//output label

int fl=0 //fl==0 create prediction output

);

#import

Files:
 

SVM_EA_v23.mq4

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

#define NR_OF_SAMPLE_LINES 1000

#define NR_OF_TEST_LINES 200

#define NR_OF_TEST_BARS 10

#define NR_OF_ATTRIB 27

#define FUTURE_WINDOW 200

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

extern int TrainTimeFrame=PERIOD_M5;

extern int TrainPeriod=PERIOD_M1;

extern int PredictPeriod=PERIOD_M1;

extern int StopLoss=40;

extern int TakeProfit=40;

extern double Lots=0.1;

extern datetime BeginDate= D'2008.09.01 00:00';

extern double C=32.0;

extern double gamma=2.0;

 

SVM_EA_v23a.mq4

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

#define NR_OF_SAMPLE_LINES 1000

#define NR_OF_TEST_LINES 200

#define NR_OF_TEST_BARS 10

#define NR_OF_ATTRIB 27

#define FUTURE_WINDOW 200

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

extern int TrainTimeFrame=PERIOD_M5;

extern int TrainPeriod=PERIOD_M1;

extern int PredictPeriod=PERIOD_M1;

extern int StopLoss=50;

extern int TakeProfit=50;

extern double Lots=0.1;

extern datetime BeginDate= D'2008.09.01 00:00';

extern double C=32.0;

extern double gamma=2.0;

 

SVM_EA_v23b.mq4

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

#define NR_OF_SAMPLE_LINES 1000

#define NR_OF_TEST_LINES 200

#define NR_OF_TEST_BARS 10

#define NR_OF_ATTRIB 27

#define FUTURE_WINDOW 200

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

extern int TrainTimeFrame=PERIOD_M5;

extern int TrainPeriod=PERIOD_M1;

extern int PredictPeriod=PERIOD_M1;

extern int StopLoss=60;

extern int TakeProfit=60;

extern double Lots=0.1;

extern datetime BeginDate= D'2008.09.01 00:00';

extern double C=32.0;

extern double gamma=2.0;

 

SVM_EA_v23c.mq4

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

#define NR_OF_SAMPLE_LINES 1000

#define NR_OF_TEST_LINES 200

#define NR_OF_TEST_BARS 10

#define NR_OF_ATTRIB 27

#define FUTURE_WINDOW 200

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

extern int TrainTimeFrame=PERIOD_M5;

extern int TrainPeriod=PERIOD_M1;

extern int PredictPeriod=PERIOD_M1;

extern int StopLoss=70;

extern int TakeProfit=70;

extern double Lots=0.1;

extern datetime BeginDate= D'2008.09.01 00:00';

extern double C=32.0;

extern double gamma=2.0;

 

SVM_EA_v23d.mq4

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

#define NR_OF_SAMPLE_LINES 1000

#define NR_OF_TEST_LINES 200

#define NR_OF_TEST_BARS 10

#define NR_OF_ATTRIB 27

#define FUTURE_WINDOW 200

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

extern int TrainTimeFrame=PERIOD_M5;

extern int TrainPeriod=PERIOD_M1;

extern int PredictPeriod=PERIOD_M1;

extern int StopLoss=80;

extern int TakeProfit=80;

extern double Lots=0.1;

extern datetime BeginDate= D'2008.09.01 00:00';

extern double C=32.0;

extern double gamma=2.0;

 

SVM_EA_v23e.mq4

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

#define NR_OF_SAMPLE_LINES 1000

#define NR_OF_TEST_LINES 200

#define NR_OF_TEST_BARS 10

#define NR_OF_ATTRIB 27

#define FUTURE_WINDOW 200

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

extern int TrainTimeFrame=PERIOD_M5;

extern int TrainPeriod=PERIOD_M1;

extern int PredictPeriod=PERIOD_M1;

extern int StopLoss=90;

extern int TakeProfit=90;

extern double Lots=0.1;

extern datetime BeginDate= D'2008.09.01 00:00';

extern double C=32.0;

extern double gamma=2.0;