Author: Maximus_genuine
Profit factor:
0.93
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reached
6 Views
0 Downloads
0 Favorites
Precipice
//+------------------------------------------------------------------+
//|                                                    Precipice.mq4 |
//|                                                Maximus_genuine   |
//|                                               gladmxm@bigmir.net |
//+------------------------------------------------------------------+
#property copyright "Maximus_genuine  "
#property link      "gladmxm@bigmir.net"

//---- input parameters
//..........................................................................
extern bool      In_BUY   =true;
extern int       step_BUY =89;       //---âõîäíûå ïàðàìåòðû ïî ëîíãàì
extern int       level_BUY=67;  

//..........................................................................
extern bool      In_SELL   =true;
extern int       step_SELL =89;      //---âõîäíûå ïàðàìåòðû ïî øîðòàì
extern int       level_SELL=67; 

//..........................................................................
 
//---- other parameters
   static int  prevtime=0;
          int    ticket=0;
          int         x=1;
       //-------------------------
          int Magic_BUY  =123;
          int Magic_SELL =321;
         
 
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//--------------------------------
      if(Digits == 5) x=10;
      
      MathSrand(GetTickCount());
//--------------------------------
    if (step_BUY< 20)  step_BUY=20;
    if (step_SELL<20) step_SELL=20;
    
    if( level_BUY< 1) level_BUY= 1;
    if( level_BUY>99) level_BUY=99;
    
    if( level_SELL<1 ) level_SELL= 1;
    if( level_SELL>99) level_SELL=99;
//--------------------------------
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//..........................................................................
    if (Time[0] == prevtime) return(0); 
                             prevtime = Time[0];
    if (!IsTradeAllowed()) {
     prevtime=Time[1]; Sleep(30000 + MathRand());  //--- ôîðìèðîâêà áàðà---
                           }
//..........................................................................
 
 
                My_Play( Magic_BUY, In_BUY, level_BUY, step_BUY);    //---òîðãîâëÿ ïî ëîíãàì
   
   
                My_Play(Magic_SELL,In_SELL,level_SELL,step_SELL);  //---òîðãîâëÿ  ïî øîðòàì
   
   
//..........................................................................
   return(0);//-----------âûõîä èç ñòàðòîâîé ôóíêöèè------------
  }
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
void  My_Play(int mn,bool flag,int level,int step) { 
 
         int total=OrdersTotal();
         
    for (int i = 0; i < total; i++) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES);//---ïðîõîä ïî îðäåðàì--
    
    
                if (OrderSymbol() == Symbol() && OrderMagicNumber() == mn) { 
                
            
                
                return(0);
                                                                           } 
                                    }
 
//..........................................................................
      ticket = -1;  
      
   
 
  if (  flag                           &&
  
        level*327.68 > MathRand() &&    //----ðàíäîìíûé âõîä â ðûíîê ---
      
      
           IsTradeAllowed()) { 
           
           if (mn<200)      {
  
 ticket= OrderSend(Symbol(), OP_BUY,lot(),Ask,5*x,Bid-x*step*Point,Ask+x*step*Point,DoubleToStr(mn,0),mn,0,Blue);
                         
    
                            }
                         
                         
                         else {
                         
 ticket= OrderSend(Symbol(),OP_SELL,lot(),Bid,5*x,Ask+x*step*Point,Bid-x*step*Point,DoubleToStr(mn,0),mn,0, Red);
                        
                              }
        
   
                 RefreshRates();   
      
              if ( ticket < 0) { Sleep(30000);   prevtime = Time[1]; } 
                                           
                                           } //-- Exit ---
 
       return(0); } 
       
 
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
double lot() {  return(0.1);    } 
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


Profitability Reports

USD/CHF Jul 2025 - Sep 2025
0.97
Total Trades 16
Won Trades 8
Lost trades 8
Win Rate 50.00 %
Expected payoff -1.34
Gross Profit 826.94
Gross Loss -848.33
Total Net Profit -21.39
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.89
Total Trades 23
Won Trades 11
Lost trades 12
Win Rate 47.83 %
Expected payoff -3.61
Gross Profit 655.33
Gross Loss -738.26
Total Net Profit -82.93
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.98
Total Trades 14
Won Trades 7
Lost trades 7
Win Rate 50.00 %
Expected payoff -0.97
Gross Profit 576.30
Gross Loss -589.90
Total Net Profit -13.60
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.98
Total Trades 44
Won Trades 22
Lost trades 22
Win Rate 50.00 %
Expected payoff -0.78
Gross Profit 1870.80
Gross Loss -1905.30
Total Net Profit -34.50
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.93
Total Trades 46
Won Trades 22
Lost trades 24
Win Rate 47.83 %
Expected payoff -2.38
Gross Profit 1416.35
Gross Loss -1525.89
Total Net Profit -109.54
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.90
Total Trades 64
Won Trades 31
Lost trades 33
Win Rate 48.44 %
Expected payoff -3.21
Gross Profit 1789.21
Gross Loss -1994.41
Total Net Profit -205.20
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
1.10
Total Trades 74
Won Trades 39
Lost trades 35
Win Rate 52.70 %
Expected payoff 4.18
Gross Profit 3430.30
Gross Loss -3121.10
Total Net Profit 309.20
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.75
Total Trades 15
Won Trades 7
Lost trades 8
Win Rate 46.67 %
Expected payoff -11.99
Gross Profit 539.00
Gross Loss -718.90
Total Net Profit -179.90
-100%
-50%
0%
50%
100%
USD/JPY Jan 2025 - Jul 2025
0.74
Total Trades 3815
Won Trades 1771
Lost trades 2044
Win Rate 46.42 %
Expected payoff -0.97
Gross Profit 10632.78
Gross Loss -14347.01
Total Net Profit -3714.23
-100%
-50%
0%
50%
100%
USD/CHF Jan 2025 - Jul 2025
0.94
Total Trades 80
Won Trades 39
Lost trades 41
Win Rate 48.75 %
Expected payoff -3.13
Gross Profit 4031.17
Gross Loss -4281.58
Total Net Profit -250.41
-100%
-50%
0%
50%
100%

Comments