help to create mql4 eapert advisor by this. lot size 0.01 order open by signal. order close by opposite signal. int    InputLookbackPeriod     = 50;

double InputLearningRate       = 0.01;

int    InputTrainingFrequency  = 100;

int    MagicNumber             = 12345;



#define INPUT_SIZE 5

#define HIDDEN_SIZE 10

#define OUTPUT_SIZE 1



double WeightsInputHidden[INPUT_SIZE][HIDDEN_SIZE];

double WeightsHiddenOutput[HIDDEN_SIZE][OUTPUT_SIZE];

double BiasHidden[HIDDEN_SIZE];

double BiasOutput[OUTPUT_SIZE];

double Momentum[INPUT_SIZE][HIDDEN_SIZE];

double MomentumHidden[HIDDEN_SIZE][OUTPUT_SIZE];

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

double Sigmoid(double x) {

   return 1.0 / (1.0 + MathExp(-x));

}

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

void InitializeNetwork() {

   MathSrand(GetTickCount());

   for(int i=0; i<INPUT_SIZE; i++)

      for(int j=0; j<HIDDEN_SIZE; j++) {

         WeightsInputHidden[i][j] = (MathRand()/32767.0 - 0.5) * 0.1;

         Momentum[i][j] = 0;

      }



   for(int i=0; i<HIDDEN_SIZE; i++) {

      BiasHidden[i] = (MathRand()/32767.0 - 0.5) * 0.1;

      for(int j=0; j<OUTPUT_SIZE; j++) {

         WeightsHiddenOutput[i][j] = (MathRand()/32767.0 - 0.5) * 0.1;

         MomentumHidden[i][j] = 0;

      }

   }



   for(int i=0; i<OUTPUT_SIZE; i++)

      BiasOutput[i] = (MathRand()/32767.0 - 0.5) * 0.1;

}

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

void GenerateFeatures(double &f[]) {

   if(Bars < InputLookbackPeriod + 1) { ArrayInitialize(f, 0); return; }



   f[0] = (Close[0] - Close[InputLookbackPeriod]) / Close[InputLookbackPeriod];



   double sum = 0, sumSq = 0;

   for(int i=0; i<InputLookbackPeriod; i++) {

      sum += Close[i];

      sumSq += Close[i]*Close[i];

   }

   double mean = sum / InputLookbackPeriod;

   double variance = (sumSq / InputLookbackPeriod) - mean*mean;

   f[1] = (mean > 0) ? MathSqrt(MathAbs(variance)) / mean : 0;



   double mom1 = (Close[0] - Close[1]) / Close[1];

   double mom2 = (Close[1] - Close[2]) / Close[2];

   f[2] = mom1 - mom2;



   f[3] = (Low[0] > 0) ? (High[0] - Low[0]) / Low[0] : 0;



   double highest = High[iHighest(Symbol(), 0, MODE_HIGH, InputLookbackPeriod, 0)];

   double lowest  = Low[iLowest(Symbol(), 0, MODE_LOW, InputLookbackPeriod, 0)];

   f[4] = (highest - lowest != 0) ? (Close[0] - lowest) / (highest - lowest) : 0;

}

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

double ForwardPropagate(double &inputs[]) {

   double hidden[HIDDEN_SIZE], output = 0;



   for(int i=0; i<HIDDEN_SIZE; i++) {

      hidden[i] = BiasHidden[i];

      for(int j=0; j<INPUT_SIZE; j++)

         hidden[i] += inputs[j] * WeightsInputHidden[j][i];

      hidden[i] = Sigmoid(hidden[i]);

   }



   for(int i=0; i<HIDDEN_SIZE; i++)

      output += hidden[i] * WeightsHiddenOutput[i][0];



   output += BiasOutput[0];

   return Sigmoid(output);

}

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

void TrainNetwork(double &inputs[], double target) {

   double hidden[HIDDEN_SIZE], output = 0;



   for(int i=0; i<HIDDEN_SIZE; i++) {

      hidden[i] = BiasHidden[i];

      for(int j=0; j<INPUT_SIZE; j++)

         hidden[i] += inputs[j] * WeightsInputHidden[j][i];

      hidden[i] = Sigmoid(hidden[i]);

   }



   for(int i=0; i<HIDDEN_SIZE; i++)

      output += hidden[i] * WeightsHiddenOutput[i][0];



   output += BiasOutput[0];

   output = Sigmoid(output);



   double error = target - output;

   double gradOut = output * (1 - output) * error;



   for(int i=0; i<HIDDEN_SIZE; i++) {

      MomentumHidden[i][0] = 0.9 * MomentumHidden[i][0] + 0.1 * gradOut * hidden[i];

      WeightsHiddenOutput[i][0] += InputLearningRate * MomentumHidden[i][0];

   }

   BiasOutput[0] += InputLearningRate * gradOut;



   double hiddenGrad[HIDDEN_SIZE];

   for(int i=0; i<HIDDEN_SIZE; i++)

      hiddenGrad[i] = hidden[i]*(1 - hidden[i]) * gradOut * WeightsHiddenOutput[i][0];



   for(int i=0; i<HIDDEN_SIZE; i++) {

      BiasHidden[i] += InputLearningRate * hiddenGrad[i];

      for(int j=0; j<INPUT_SIZE; j++) {

         Momentum[j][i] = 0.9 * Momentum[j][i] + 0.1 * hiddenGrad[i] * inputs[j];

         WeightsInputHidden[j][i] += InputLearningRate * Momentum[j][i];

      }

   }

}

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

Sell Signal :  if(prediction < 0.50) 

Buy Signal :   if(prediction > 0.50)