KathyEA1-1





//+------------------------------------------------------------------+
//|                           Copyright 2005, Gordago Software Corp. |
//|                                          http://www.gordago.com/ |
//+------------------------------------------------------------------+


#property copyright "Copyright 2005, Gordago Software Corp."
#property link      "http://www.gordago.com"

extern double lTakeProfit = 10;
extern double sTakeProfit = 10;
extern double Lots = 0.1;

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start(){
   int cnt, ticket;
   if(Bars<100){
      Print("bars less than 100");
      return(0);
   }
   if(lTakeProfit<10){
      Print("TakeProfit less than 10");
      return(0);
   }
   if(sTakeProfit<10){
      Print("TakeProfit less than 10");
      return(0);
   }

   double diMA0=iMA(NULL,5,13,0,MODE_EMA,PRICE_CLOSE,0);
   double diMA1=iMA(NULL,5,34,0,MODE_EMA,PRICE_CLOSE,0);
   double diRSI2=iRSI(NULL,5,21,PRICE_CLOSE,0);
   double diOpen3=iOpen(NULL,1,0);
   double diSAR4=iSAR(NULL,1,0.05,0.2,0);
   double diMA5=iMA(NULL,5,13,0,MODE_EMA,PRICE_CLOSE,0);
   double diMA6=iMA(NULL,5,13,0,MODE_EMA,PRICE_CLOSE,1);
   double diMA7=iMA(NULL,5,13,0,MODE_EMA,PRICE_CLOSE,0);
   double diMA8=iMA(NULL,5,34,0,MODE_EMA,PRICE_CLOSE,0);
   double diRSI9=iRSI(NULL,5,21,PRICE_CLOSE,0);
   double diOpen10=iOpen(NULL,1,0);
   double diSAR11=iSAR(NULL,1,0.05,0.2,0);
   double diMA12=iMA(NULL,5,13,0,MODE_EMA,PRICE_CLOSE,0);
   double diMA13=iMA(NULL,5,13,0,MODE_EMA,PRICE_CLOSE,1);

   int total=OrdersTotal();
   if(total<1){
      if(AccountFreeMargin()<(1000*Lots)){
         Print("We have no money. Free Margin = ", AccountFreeMargin());
         return(0);
      }

      if ((diMA0>diMA1 && diRSI2>50 && diOpen3>diSAR4 && diMA5>diMA6)){
         ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+lTakeProfit*Point, "gordago simple",16384,0,Green);
         if(ticket>0){
            if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
         }
         else Print("Error opening BUY order : ",GetLastError());
         return(0);
      }

      if ((diMA7<diMA8 && diRSI9<50 && diOpen10<diSAR11 && diMA12<diMA13)){
         ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-sTakeProfit*Point,"gordago sample",16384,0,Red);
         if(ticket>0) {
            if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
         }
         else Print("Error opening SELL order : ",GetLastError());
         return(0);
      }
   }
   for(cnt=0;cnt<total;cnt++) {
      OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
      if(OrderType()<=OP_SELL && OrderSymbol()==Symbol()) {
         if(OrderType()==OP_BUY){
         }else{
         }
      }
   }
}



Sample





Analysis



Market Information Used:

Series array that contains open prices of each bar


Indicator Curves created:


Indicators Used:

Moving average indicator
Relative strength index
Parabolic Stop and Reverse system


Custom Indicators Used:

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

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:-145.02

Request Backtest for KathyEA1-1


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

Pair: Period: