escape-easy

Profit factor:
0.11
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reached
Miscellaneous
It plays sound alerts
1 Views
0 Downloads
0 Favorites
escape-easy
//+------------------------------------------------------------------+
//|                                                       escape.mq4 |
//|                                    Copyright © 2009, OGUZ BAYRAM |
//|                                            es_cape77@hotmail.com |
//+------------------------------------------------------------------+
extern double lTakeProfit = 2;
extern double sTakeProfit = 2;
extern double lStopLoss = 300;
extern double sStopLoss = 300;
extern color clOpenBuy = Green;
extern color clOpenSell = Red;
extern string Name_Expert = "escape";
extern int Slippage = 1;
extern bool UseSound = false;
extern bool FractionalPips = true;
extern string NameFileSound = "dr alban.wav";
extern double Lots = 0.02;


void deinit() {
   Comment("");
}
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start(){
   if(Bars<100){
      Print("bars less than 100");
      return(0);
   }
   if (Digits==3 || Digits==5)
   if(lTakeProfit<1){
      Print("TakeProfit less than 1");
      return(0);
   }
   if(sTakeProfit<1){
      Print("TakeProfit less than 1");
      return(0);
   }

   double diClose0=iClose(NULL,5,0);
   double diMA1=iMA(NULL,5,5,0,MODE_SMA,PRICE_OPEN,1);
   double diClose2=iClose(NULL,5,0);
   double diMA3=iMA(NULL,5,4,0,MODE_SMA,PRICE_OPEN,1);

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

      if ((diClose0<diMA1)){
         OpenBuy();
         return(0);
      }

      if ((diClose2>diMA3)){
         OpenSell();
         return(0);
      }
   }
   
   return (0);
}

bool ExistPositions() {
for (int i=100; i<OrdersTotal(); i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol()==Symbol()) {
return(True);
}
} 
} 
return(false);
}
void OpenBuy() { 
   double ldLot, ldStop, ldTake; 
   string lsComm; 
   ldLot = GetSizeLot(); 
   ldStop = GetStopLossBuy(); 
   ldTake = GetTakeProfitBuy(); 
   lsComm = GetCommentForOrder(); 
   OrderSend(Symbol
(),OP_BUY,ldLot,Ask,Slippage,ldStop,ldTake,lsComm,0,0,clOpenBuy); 
   if (UseSound) PlaySound(NameFileSound); 
} 
void OpenSell() { 
   double ldLot, ldStop, ldTake; 
   string lsComm; 

   ldLot = GetSizeLot(); 
   ldStop = GetStopLossSell(); 
   ldTake = GetTakeProfitSell(); 
   lsComm = GetCommentForOrder(); 
   OrderSend(Symbol
(),OP_SELL,ldLot,Bid,Slippage,ldStop,ldTake,lsComm,0,0,clOpenSell); 
   if (UseSound) PlaySound(NameFileSound); 
} 
string GetCommentForOrder() { return(Name_Expert); } 
double GetSizeLot() { return(Lots); } 
double GetTakeProfitBuy() { return(Ask+lTakeProfit*Point); } 
double GetTakeProfitSell() { return(Bid-sTakeProfit*Point); }
double GetStopLossBuy() { return(Bid-lStopLoss*Point); }
double GetStopLossSell() { return(Ask+sStopLoss*Point); }

Profitability Reports

USD/CAD Oct 2024 - Jan 2025
0.10
Total Trades 38202
Won Trades 35852
Lost trades 2350
Win Rate 93.85 %
Expected payoff -0.25
Gross Profit 1075.26
Gross Loss -10571.13
Total Net Profit -9495.87
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.07
Total Trades 19223
Won Trades 17626
Lost trades 1597
Win Rate 91.69 %
Expected payoff -0.50
Gross Profit 705.04
Gross Loss -10356.88
Total Net Profit -9651.84
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
0.18
Total Trades 52207
Won Trades 50390
Lost trades 1817
Win Rate 96.52 %
Expected payoff -0.18
Gross Profit 2015.60
Gross Loss -11259.52
Total Net Profit -9243.92
-100%
-50%
0%
50%
100%
AUD/USD Oct 2024 - Jan 2025
0.07
Total Trades 19878
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -0.49
Gross Profit 729.64
Gross Loss -10377.14
Total Net Profit -9647.50
-100%
-50%
0%
50%
100%

Comments