Peceptron_Mult









extern string s1 = "EURUSD";
extern int    x1 = 100;
extern int    x2 = 100;
extern int    x3 = 100;
extern int    x4 = 100;
extern double sl1 = 60;
extern int    tp1 = 60;
extern string s2 = "GBPJPY";
extern int    x5 = 100;
extern int    x6 = 100;
extern int    x7 = 100;
extern int    x8 = 100;
extern double sl2 = 60;
extern int    tp2 = 60;
extern string s3 = "AUDNZD";
extern int    x9  = 100;
extern int    x10 = 100;
extern int    x11 = 100;
extern int    x12 = 100;
extern double sl3 = 60;
extern int    tp3 = 60;
extern double    lot           = 0.2;
extern double    sl            = 85;
extern int       MagicNumber   = 777;
static int       prevtime = 0;

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
   if (Time[0] == prevtime) return(0);
       prevtime = Time[0];
//---
      double s1_bid = MarketInfo(s1,MODE_BID);
      double s1_ask = MarketInfo(s1,MODE_ASK);
      double s2_bid = MarketInfo(s2,MODE_BID);
      double s2_ask = MarketInfo(s2,MODE_ASK);
      double s3_bid = MarketInfo(s3,MODE_BID);
      double s3_ask = MarketInfo(s3,MODE_ASK);

   if(retOrders(s1)==0 && perceptron(s1,x1,x2,x3,x4)>0){
         OrderSend(s1,OP_BUY, lot, s1_ask, 3, s1_bid - sl1 * Point, s1_bid + tp1 * Point, "", MagicNumber, 0, Blue);}else{prevtime = Time[1];}
   if(retOrders(s2)==0 && perceptron(s2,x5,x6,x7,x8)>0){
         OrderSend(s2,OP_BUY, lot, s2_ask, 3, s2_bid - sl2 * Point, s2_bid + tp2 * Point, "", MagicNumber, 0, Blue);}else{prevtime = Time[1];}
    if(retOrders(s3)==0 && perceptron(s3,x9,x10,x11,x12)>0){
         OrderSend(s3,OP_BUY, lot, s3_ask, 3, s3_bid - sl3 * Point, s3_bid + tp3 * Point, "", MagicNumber, 0, Blue);}else{prevtime = Time[1];}       
    if(retOrders(s1)==0 && perceptron(s1,x1,x2,x3,x4)<0){
        OrderSend(s1,OP_SELL,lot, s1_bid, 3, s1_ask + sl1 * Point, s1_ask - tp1 * Point, "", MagicNumber, 0, Red);}else{prevtime = Time[1];}
   if(retOrders(s2)==0 && perceptron(s2,x5,x6,x7,x8)<0){
         OrderSend(s2,OP_SELL,lot, s2_bid, 3, s2_ask + sl2 * Point, s2_ask - tp2 * Point, "", MagicNumber, 0, Red);}else{prevtime = Time[1];}
    if(retOrders(s3)==0 && perceptron(s3,x9,x10,x11,x12)<0){
         OrderSend(s3,OP_SELL,lot, s3_bid, 3, s3_ask + sl3 * Point, s3_ask - tp3 * Point, "", MagicNumber, 0, Red);}else{prevtime = Time[1];}       
////////////////////////////////////////////////////////////////////////////////////////////
   return(0);
  }
//+------------------------------------------------------------------+
double perceptron(string Sy,int y1,int y2,int y3,int y4) 
  {
   double w1 = y1 - 100;
   double w2 = y2 - 100;
   double w3 = y3 - 100;
   double w4 = y4 - 100;
   double a1 = iAC(Sy, 0, 0);
   double a2 = iAC(Sy, 0, 7);
   double a3 = iAC(Sy, 0, 14);
   double a4 = iAC(Sy, 0, 21);
   return(w1 * a1 + w2 * a2 + w3 * a3 + w4 * a4);
   }
//+------------------------------------------------------------------+
int retOrders(string sym){

   int total = OrdersTotal();
   int OrderCount=0;
   for(int i = 0; i <= total; i++) 
     {
       OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
       if( OrderMagicNumber() == MagicNumber && OrderSymbol() == sym) 
         {
          OrderCount++;
         }
      }
     return(OrderCount);
 }
 //+------------------------------------------------------------------+



Sample





Analysis



Market Information Used:

Series array that contains open time of each bar


Indicator Curves created:


Indicators Used:

Bill Williams Accelerator/Decelerator oscillator


Custom Indicators Used:

Order Management characteristics:
It automatically opens orders when conditions are reached
Checks for the total of open orders


Other Features:

BackTest : EURUSD on H1

From 2009-08-01 to 2009-10-01 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2009-12-01 to 2010-01-17 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2010-04-01 to 2010-04-30 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2010-05-01 to 2010-05-31 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2010-06-01 to 2010-06-30 Profit Factor:0.00 Total Net Profit:0.00

BackTest : GBPUSD on H1

From 2010-01-01 to 2010-02-27 Profit Factor:0.00 Total Net Profit:0.00

BackTest : USDCAD on H1

From 2009-12-01 to 2010-01-01 Profit Factor:0.00 Total Net Profit:0.00

BackTest : USDJPY on H1

From 2009-11-01 to 2009-11-30 Profit Factor:0.00 Total Net Profit:0.00

Request Backtest for Peceptron_Mult


From : (yyyy/mm/dd) To: (yyyy/mm/dd)

Pair: Period: