KathyEA1-1(1)

Author: Copyright 2005, Gordago Software Corp.
Profit factor:
0.56
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reached
1 Views
0 Downloads
0 Favorites
KathyEA1-1(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{
         }
      }
   }
}

Profitability Reports

NZD/USD Oct 2024 - Jan 2025
0.55
Total Trades 33
Won Trades 32
Lost trades 1
Win Rate 96.97 %
Expected payoff -0.78
Gross Profit 32.00
Gross Loss -57.80
Total Net Profit -25.80
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
0.65
Total Trades 66
Won Trades 65
Lost trades 1
Win Rate 98.48 %
Expected payoff -0.54
Gross Profit 65.00
Gross Loss -100.70
Total Net Profit -35.70
-100%
-50%
0%
50%
100%
AUD/USD Oct 2024 - Jan 2025
0.47
Total Trades 35
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -1.09
Gross Profit 34.00
Gross Loss -72.00
Total Net Profit -38.00
-100%
-50%
0%
50%
100%

Comments