Author: FORTRADER.RU
Profit factor:
0.54
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reachedChecks for the total of closed ordersIt can change open orders parameters, due to possible stepping strategyIt Closes Orders by itself
Indicators Used
Bill Williams Accelerator/Decelerator oscillatorStochastic oscillator
10 Views
1 Downloads
0 Favorites
OzFx1.02
//+------------------------------------------------------------------+
//|                                                         OzFx.mq4 |
//|                                                     FORTRADER.RU |
//|                                          http://www.FORTRADER.RU |
//+------------------------------------------------------------------+
#property copyright "FORTRADER.RU"
#property link      "http://www.FORTRADER.RU"


double AC,Stoh,ACPrev;
extern int stoploss=100;
extern int point=50;
extern int sto=5;
extern int Ursto=50;
extern int TrailingStop=50;

int stopb,bar,stops,modok;
int comment,cnt;
 string com;
 
 /*Èñòîðèÿ èçìåíåíèé:
 -1.02 Äîáàâëåí äëÿ èçìåíåíèÿ óðîâåíü ñòîõàñòèêà Ursto
 -1.02 Äîáàâëåíà ðàáîòà ñ òðåéëèíã ñòîïîì, ïðè TrailingStop=0 ðàáîòàåò îëãîðèòì ïî óìîë÷àíèþ*/
int start()
  {
  
  AC=iAC(NULL, 0, 1);
  ACPrev=iAC(NULL, 0, 2);
  Stoh=iStochastic(NULL,0,sto,3,3,MODE_SMA,0,MODE_MAIN,1);
    if(OrdersTotal()<1){stopb=0;  stops=0;}
  
  
  if(Stoh>Ursto && AC>ACPrev && AC>0 && ACPrev<0 && stopb==0 && bar!=Bars)
  {

  comment=comment+1;
   com="aa"+comment;

  OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Ask-stoploss*Point,Ask+point*Point,com,0,0,White);
  OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Ask-stoploss*Point,Ask+(point*2)*Point,"",0,0,White);
  OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Ask-stoploss*Point,Ask+(point*3)*Point,"",0,0,White);
  OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Ask-stoploss*Point,Ask+(point*4)*Point,"",0,0,White);
  OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Ask-stoploss*Point,0,"s",0,0,Green);
  stopb=1;
  bar=Bars;
  }
  
  
  if( Stoh<Ursto && AC<ACPrev && AC<0 && ACPrev>0 && stops==0 && bar!=Bars )
  {  comment=comment+1;
   com="aa"+comment;
  OrderSend(Symbol(),OP_SELL,0.1,Bid,3,Bid+stoploss*Point,Bid-point*Point,com,0,0,Green);
  OrderSend(Symbol(),OP_SELL,0.1,Bid,3,Bid+stoploss*Point,Bid-(point*2)*Point,"",0,45645,Green);
  OrderSend(Symbol(),OP_SELL,0.1,Bid,3,Bid+stoploss*Point,Bid-(point*3)*Point,"",0,45645,Green);
  OrderSend(Symbol(),OP_SELL,0.1,Bid,3,Bid+stoploss*Point,Bid-(point*4)*Point,"",0,456456,Green);
  OrderSend(Symbol(),OP_SELL,0.1,Bid,3,Bid+stoploss*Point,0,"s",0,56456,Green);
  stops=1;
  bar=Bars;
  }
  
 modok=0;
       int i,accTotal=OrdersHistoryTotal();
       for(i=0;i<accTotal;i++)
       { 
         OrderSelect(i, SELECT_BY_POS, MODE_HISTORY);
         string ca=com+"[tp]";
         if(OrderProfit()>10 && OrderComment()==ca){modok=1;}
         
       }
          
  if(TrailingStop==0)
  {
   for( cnt=0;cnt<OrdersTotal();cnt++)
     {
      OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
        {
         if(OrderType()==OP_BUY && modok==1)  
          {
          OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,Blue);
         // OrderClose(OrderTicket(),OrderLots(),Bid,10,Violet); 
          // return(0); 
          }
          if(OrderType()==OP_SELL && modok==1)  
          {
          OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,Blue);
         // OrderClose(OrderTicket(),OrderLots(),Bid,10,Violet); 
          // return(0); 
          }
          if(OrderType()==OP_BUY && Stoh<50 && AC<ACPrev && AC<0 && ACPrev>0 )  
          {
          OrderClose(OrderTicket(),OrderLots(),Bid,10,Violet); 
          }
           if(OrderType()==OP_SELL  && Stoh>50 && AC>ACPrev && AC>0 && ACPrev<0 )   
          {
           OrderClose(OrderTicket(),OrderLots(),Ask,10,Violet); 
           stopb=0;
          }
         }
       }
    }
    
      if(TrailingStop>=1)
  {
   for( cnt=0;cnt<OrdersTotal();cnt++)
     {
      OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
        {
         if(OrderType()==OP_BUY && modok==1)  
          {
          if(Bid-OrderOpenPrice()>Point*TrailingStop)
                 {
                  if(OrderStopLoss()<Bid-Point*TrailingStop)
                    {
                        OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()-Point*TrailingStop,OrderTakeProfit(),0,Blue);
                       // OrderClose(OrderTicket(),OrderLots(),Bid,10,Violet); 
                        // return(0); 
                      }
                 }
          }
          if(OrderType()==OP_SELL && modok==1)  
          {
           if((OrderOpenPrice()-Ask)>(Point*TrailingStop))
                 {
                  if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0))
                    {
                     OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()+Point*TrailingStop,OrderTakeProfit(),0,Blue);
                    // OrderClose(OrderTicket(),OrderLots(),Bid,10,Violet); 
                     // return(0); 
                    }
                 }
                    
          }
          if(OrderType()==OP_BUY && Stoh<50 && AC<ACPrev && AC<0 && ACPrev>0 )  
          {
          OrderClose(OrderTicket(),OrderLots(),Bid,10,Violet); 
          }
           if(OrderType()==OP_SELL  && Stoh>50 && AC>ACPrev && AC>0 && ACPrev<0 )   
          {
           OrderClose(OrderTicket(),OrderLots(),Ask,10,Violet); 
           stopb=0;
          }
         }
       }
    }
      
   return(0);
  }

Profitability Reports

NZD/USD Jul 2025 - Sep 2025
0.65
Total Trades 1235
Won Trades 408
Lost trades 827
Win Rate 33.04 %
Expected payoff -1.90
Gross Profit 4337.90
Gross Loss -6683.30
Total Net Profit -2345.40
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.77
Total Trades 1250
Won Trades 473
Lost trades 777
Win Rate 37.84 %
Expected payoff -1.32
Gross Profit 5628.80
Gross Loss -7274.60
Total Net Profit -1645.80
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.00
Total Trades 0
Won Trades 0
Lost trades 0
Win Rate 0.0 %
Expected payoff 0.00
Gross Profit 0.00
Gross Loss 0.00
Total Net Profit 0.00
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.40
Total Trades 1320
Won Trades 313
Lost trades 1007
Win Rate 23.71 %
Expected payoff -2.95
Gross Profit 2588.73
Gross Loss -6480.13
Total Net Profit -3891.40
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.83
Total Trades 1200
Won Trades 486
Lost trades 714
Win Rate 40.50 %
Expected payoff -0.95
Gross Profit 5595.20
Gross Loss -6731.90
Total Net Profit -1136.70
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.63
Total Trades 1320
Won Trades 458
Lost trades 862
Win Rate 34.70 %
Expected payoff -1.86
Gross Profit 4195.50
Gross Loss -6646.80
Total Net Profit -2451.30
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
0.47
Total Trades 810
Won Trades 210
Lost trades 600
Win Rate 25.93 %
Expected payoff -2.74
Gross Profit 1942.89
Gross Loss -4162.41
Total Net Profit -2219.52
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.42
Total Trades 790
Won Trades 199
Lost trades 591
Win Rate 25.19 %
Expected payoff -4.06
Gross Profit 2359.10
Gross Loss -5563.90
Total Net Profit -3204.80
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
0.71
Total Trades 775
Won Trades 274
Lost trades 501
Win Rate 35.35 %
Expected payoff -1.80
Gross Profit 3485.00
Gross Loss -4879.90
Total Net Profit -1394.90
-100%
-50%
0%
50%
100%
AUD/USD Oct 2024 - Jan 2025
0.65
Total Trades 840
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -2.13
Gross Profit 3380.50
Gross Loss -5166.00
Total Net Profit -1785.50
-100%
-50%
0%
50%
100%

Comments