Author: Copyright � 2005, MetaQuotes Software Corp.
Profit factor:
0.73
Orders Execution
It automatically opens orders when conditions are reachedIt Closes Orders by itself It can change open orders parameters, due to possible stepping strategy
Indicators Used
Commodity channel index
10 Views
0 Downloads
0 Favorites
UsdChf_v1
//+------------------------------------------------------------------+
//|                                                        Probe.mq4 |
//|                      Copyright © 2005, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+

extern double Zazor = 30; //Óðîåíü îòëîæåíîãî îðäåðà îò òåêóùåé öåíû
extern double StopLoss =95; 
extern double Kanal = 120 ;
extern double periodinduka = 73 ;
extern double UdalOrdotl = 30 ;
extern double TrailingStop = 110;
extern double UrBezubitka = 60 ;
//---- 


//----
   
  
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+

  
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//---- 
 
 
double vg = Kanal;
double ng = -Kanal;

double cci0=iCCI(NULL,PERIOD_H4,periodinduka,PRICE_TYPICAL,0);
double cci1=iCCI(NULL,PERIOD_H4,periodinduka,PRICE_TYPICAL,1);
double cci2=iCCI(NULL,PERIOD_H4,periodinduka,PRICE_TYPICAL,2);
double cnt,trade;
 trade = 1;
for(cnt=0;cnt<OrdersTotal ();cnt++) {
OrderSelect( cnt,SELECT_BY_POS,MODE_TRADES) ;
if(OrderSymbol()==Symbol())  trade = 0;
}


 if ( cci0 >ng &&  cci1<ng && cci2<ng && trade==1   )
  { 
 OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask+Zazor*Point,3,Ask+Zazor*Point-StopLoss*Point,0,0,Green);    

}

if ( cci0<vg && cci1>vg && cci2>vg  && trade==1        ) 
  { 
 OrderSend(Symbol(),OP_SELLSTOP,0.1,Bid-Zazor*Point,3,Bid-Zazor*Point+StopLoss*Point,0,0,Green);    

}
for(cnt=0;cnt<OrdersTotal ();cnt++) {
        {
OrderSelect(0, SELECT_BY_POS,MODE_TRADES) ;
if (OrdersTotal () >0 ) {


if (OrderType()==OP_BUYSTOP && OrderOpenPrice() -Ask  > UdalOrdotl* Point && OrderSymbol()==Symbol()) {
OrderDelete (OrderTicket () ); 
       } }
 
       {
if (OrderType()==OP_SELLSTOP && Ask - OrderOpenPrice()   > UdalOrdotl* Point && OrderSymbol()==Symbol())
      {
OrderDelete (OrderTicket () ); 
        }
          }
             }

//-------
 if ( OrdersTotal () > 0   ) 
            {
  for(cnt=0;cnt<OrdersTotal ();cnt++) {          
OrderSelect(cnt, SELECT_BY_POS,MODE_TRADES) ; 

if(OrderType()==OP_BUY && cci0<vg && cci1>vg && cci2>vg && OrderSymbol()==Symbol()  ) {
 OrderClose(OrderTicket(),0.1,Bid,3,White);
OrderSend(Symbol(),OP_SELLSTOP,0.1,Bid-Zazor*Point,3,Bid-Zazor*Point+StopLoss*Point,0,0,Green);
            }
if(OrderType()==OP_SELL &&  cci0 >ng && cci1<ng && cci2<ng && OrderSymbol()==Symbol()  ) {
 OrderClose(OrderTicket(),0.1,Ask,3,White);
OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask+Zazor*Point,3,Ask+Zazor*Point-StopLoss*Point,0,0,Green); 
 }       }
 
           }    
              }
//Print(" CCI= ",cci0," Osma= ",osma," OsMA1= ",osma1," OsMA2= ",osma2," OsMA3= ",osma3,vniz,vverx);

for(cnt=0;cnt<OrdersTotal ();cnt++){
 if(TrailingStop>0 && OrderSymbol()==Symbol())  
              {                 
               if(Bid-OrderOpenPrice()>Point*TrailingStop)
                 {
                  if(OrderStopLoss()<Bid-Point*TrailingStop)
                    {
                     OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green);
                     return(0);
                    }
                 }
              }
           if(TrailingStop>0 && OrderSymbol()==Symbol())  
              {                 
               if((OrderOpenPrice()-Ask)>(Point*TrailingStop))
                 {
                  if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0))
                    {
                     OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red);
                     return(0);
                    }
                 }
              } 
            }

for(cnt=0;cnt<OrdersTotal ();cnt++){
OrderSelect(cnt, SELECT_BY_POS) ;
if (OrderType()==OP_BUY && Bid-OrderOpenPrice() > UrBezubitka*Point && OrderSymbol()==Symbol() && OrderOpenPrice()-OrderStopLoss() > 10*Point && UrBezubitka>0) { 
OrderModify( OrderTicket (), 0, OrderOpenPrice(), 0, 0,0) ; }
if (OrderType()==OP_SELL && OrderOpenPrice()-Bid > UrBezubitka*Point && OrderSymbol()==Symbol()&& OrderStopLoss()-OrderOpenPrice() > 10*Point&& UrBezubitka>0) {
OrderModify( OrderTicket (), 0, OrderOpenPrice(), 0, 0,0) ; }
 }

//----
return(0);   
  } 

//+------------------------------------------------------------------+

Profitability Reports

AUD/USD Jul 2025 - Sep 2025
2.70
Total Trades 9
Won Trades 6
Lost trades 3
Win Rate 66.67 %
Expected payoff 5.38
Gross Profit 76.90
Gross Loss -28.50
Total Net Profit 48.40
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
1.88
Total Trades 29
Won Trades 16
Lost trades 13
Win Rate 55.17 %
Expected payoff 3.75
Gross Profit 232.30
Gross Loss -123.50
Total Net Profit 108.80
-100%
-50%
0%
50%
100%
USD/JPY Jul 2025 - Sep 2025
1.16
Total Trades 20
Won Trades 11
Lost trades 9
Win Rate 55.00 %
Expected payoff 0.46
Gross Profit 68.02
Gross Loss -58.79
Total Net Profit 9.23
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
0.64
Total Trades 10
Won Trades 5
Lost trades 5
Win Rate 50.00 %
Expected payoff -1.20
Gross Profit 21.12
Gross Loss -33.15
Total Net Profit -12.03
-100%
-50%
0%
50%
100%
GBP/CAD Oct 2024 - Jan 2025
0.61
Total Trades 62
Won Trades 23
Lost trades 39
Win Rate 37.10 %
Expected payoff -1.70
Gross Profit 165.80
Gross Loss -271.45
Total Net Profit -105.65
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.55
Total Trades 21
Won Trades 9
Lost trades 12
Win Rate 42.86 %
Expected payoff -2.46
Gross Profit 62.30
Gross Loss -114.00
Total Net Profit -51.70
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.55
Total Trades 22
Won Trades 9
Lost trades 13
Win Rate 40.91 %
Expected payoff -2.52
Gross Profit 68.10
Gross Loss -123.50
Total Net Profit -55.40
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.46
Total Trades 17
Won Trades 13
Lost trades 4
Win Rate 76.47 %
Expected payoff -1.52
Gross Profit 21.90
Gross Loss -47.80
Total Net Profit -25.90
-100%
-50%
0%
50%
100%
AUD/USD Oct 2024 - Jan 2025
0.40
Total Trades 26
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -3.50
Gross Profit 60.90
Gross Loss -152.00
Total Net Profit -91.10
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
0.40
Total Trades 48
Won Trades 26
Lost trades 22
Win Rate 54.17 %
Expected payoff -2.61
Gross Profit 83.50
Gross Loss -209.00
Total Net Profit -125.50
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.08
Total Trades 12
Won Trades 9
Lost trades 3
Win Rate 75.00 %
Expected payoff -2.19
Gross Profit 2.20
Gross Loss -28.50
Total Net Profit -26.30
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.01
Total Trades 234
Won Trades 1
Lost trades 233
Win Rate 0.43 %
Expected payoff -6.11
Gross Profit 10.74
Gross Loss -1441.13
Total Net Profit -1430.39
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.00
Total Trades 170
Won Trades 0
Lost trades 170
Win Rate 0.00 %
Expected payoff -6.79
Gross Profit 0.00
Gross Loss -1153.49
Total Net Profit -1153.49
-100%
-50%
0%
50%
100%

Comments