SVM290_1

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

//|                                                     SVM289_1.mq5 |

//|                        Copyright 2010, MetaQuotes Software Corp. |

//|                                              http://www.mql5.com |

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

#property copyright "2010, MetaQuotes Software Corp."

#property link      "http://www.mql5.com"

#property version   "1.00"

#define COL 18 //Nr of Attributes

//enum { C_SVC, NU_SVC, ONE_CLASS, EPSILON_SVR, NU_SVR };    /* svm_type */

#define C_SVC 0

#define NU_SVC 1

#define ONE_CLASS 2

#define EPSILON_SVR 3

#define NU_SVR 4

//enum { LINEAR, POLY, RBF, SIGMOID, PRECOMPUTED }; /* kernel_type */

#define LINEAR 0

#define POLY 1

#define RBF 2

#define SIGMOID 3

#define PRECOMPUTED 4

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

//| normalize=1,2,3,4

//| 1-normalize TRAIN lines from std and mean calculated from TRAIN lines

//| 1-normalize TEST lines from std and mean calculated from TEST lines

//| ..................................................................

//| 2-normalize TRAIN lines from std and mean calculated from TRAIN lines 

//| 2-normalize TEST lines from std and mean calculated from TRAIN lines   

//| ..................................................................

//| 3-normalize TRAIN lines from range and midrange calculated from TRAIN lines  

//| 3-normalize TEST lines from range and midrange calculated from TEST lines

//| ..................................................................

//| 4-normalize TEST lines from range and midrange calculated from TRAIN lines                                                         

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

#import "svm290_1.dll"

int svm_classify(

    double &svm_samples_class_dyn_1[],

    double &svm_samples_attrib_dyn_1[][COL],   

    double &svm_test_attrib_dyn_1[][COL],

    int nr_of_sample_lines, //2200

   int nr_of_test_lines, //800

   int nr_of_attrib,

    int FutureWindow,    //200

   string file_name,

   double C,

   double g,

   int  svm_type,//C_SVC,

   int  kernel_type,//RBF,  

   double &ptr_predict_label__1[],//predict output                               

   int flag,//0-no file ,1-file ma,2-file ma diff

    int normalize,//1-normalize 0-

    int flag2,//0-do nothing 1-create model 2-predict 3-create model and predict

   int flag3//0-no predict file 1-predict file

   );

#import

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

//| Expert initialization function                                   |

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

int OnInit()

  {

//---

  

//---

   return(0);

  }

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

//| Expert deinitialization function                                 |

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

void OnDeinit(const int reason)

  {

//---

  

  }

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

//| Expert tick function                                             |

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

void OnTick()

  {

//---

  

  }

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