Nrtr_revers_www.forex-instruments.info

Author: idea of Konkop, conversed by Rosh
Profit factor:
0.75
Orders Execution
Checks for the total of open ordersIt Closes Orders by itself It automatically opens orders when conditions are reached
Indicators Used
Indicator of the average true range
11 Views
0 Downloads
0 Favorites
Nrtr_revers_www.forex-instruments.info
//+------------------------------------------------------------------+
//|                                                  NRTR_Revers.mq4 |
//|                                 idea of Konkop, conversed by Rosh|
//|                           http://forexsystems.ru/phpBB/index.php |
//+------------------------------------------------------------------+
#property copyright "idea of Konkop, conversed by Rosh"
#property link      "http://forexsystems.ru/phpBB/index.php"
//----
#include <stdlib.mqh>
//----
extern double TakeProfit=4000;
extern double Lots=0.1;
extern double TrailingStop=0;
extern double StopLoss=4000;
extern double Slippage=6;
extern int ExpertMagicNumber=1007;
//---- input parameters
extern int       per=3;// ïåðèîä ÀÒÐ
extern int       reverse=100;// ïóíêòû
extern double    k=3.0; // êîýôèèöèåíò îò âîëàòèëüíîñòè
string trend="up";
double line=0.0;
int b=0,cnt=0;
double dif=10.0,breaklevel=10;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//---- 
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//---- 
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
   int total,ticket;
//---- 
   if (Bars>b)
     {
      b=Bars;
      //Print("Bars=",Bars);
      Print("trend=",trend);
      //Print("per/2.0=",per/2.0);
      //Print("per/2.0=",MathRound(per/2.0));
      //Print("dif=",dif);
      //k=per;
      dif=MathRound(k*((iATR(NULL,0,per,1)/Point))/10);
      breaklevel=dif;
//----
      if (trend=="up")
        {
         line=Low[Lowest(NULL,0,MODE_LOW,per-1,2)]-dif*Point;
         //Print("line=",line,"   breaklevel=",breaklevel,"   line-Close[1]=",line-Close[1],"    Low[Lowest(NULL,0,MODE_LOW,per,1)]-line=",Low[Lowest(NULL,0,MODE_LOW,per,1)]-line);
         //if (((line-Close[1])>breaklevel*Point)||((Low[Lowest(NULL,0,MODE_LOW,per,MathRound(per/2))]-line)>=reverse*Point))
         if(((line-Close[1])>breaklevel*Point)  ||  ((Low[Lowest(NULL,0,MODE_LOW,MathRound(per/2.0),per-MathRound(per/2.0)+1)]-line)>=reverse*Point)  )
           {
            Print("ìåíÿåì òðåíä");
            trend="down";
            total=OrdersTotal();
            for(cnt=0;cnt<total;cnt++)
              {
               OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
               if (OrderType()==OP_BUY)
                 {
                  OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,Orange);
                  //return(0);
                 }
              }// for
            if (OrdersTotal()<1)
              {
               ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,Bid+StopLoss*Point,Bid-TakeProfit*Point,"sell",ExpertMagicNumber,0,Red);
               if(ticket<0)
                 {
                  Print("OrderSend failed with error #",GetLastError());
                  return(0);
                 }
               return(0);
              }
           }// if (((line-Close[1])>breaklevel*Po....  
         return(0);
        }//if (trend=="up")
      if (trend=="down")
        {
         line=High[Highest(NULL,0,MODE_HIGH,per-1,2)]+dif*Point;
         //if (((Close[1]-line)>breaklevel*Point)||((line-High[Highest(NULL,0,MODE_HIGH,per,MathRound(per/2))])>=reverse*Point))
         if (((Close[1]-line)>breaklevel*Point)||((line-High[Highest(NULL,0,MODE_HIGH,MathRound(per/2.0),per-MathRound(per/2.0)+1)])>=reverse*Point))
           {
            Print("ìåíÿåì òðåíä");
            trend="up";
            total=OrdersTotal();
            for(cnt=0;cnt<total;cnt++)
              {
               OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
               if (OrderType()==OP_SELL)
                 {
                  OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,White);
                 }
              }// for
            if (OrdersTotal()<1)
              {
               ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,Ask-StopLoss*Point,Ask+TakeProfit*Point,"buy",ExpertMagicNumber,0,Blue);
               return(0);
               if(ticket<0)
                 {
                  Print("OrderSend failed with error #",GetLastError());
                  return(0);
                 }
               return(0);
              }
           }// if (((Close[1]-line)>breakle.....
         return(0);
        }//if (trend=="down")
     }//if (Bars>b)
//----
   return(0);
  }
//+------------------------------------------------------------------+

Profitability Reports

USD/CHF Jan 2025 - Jul 2025
1.15
Total Trades 225
Won Trades 111
Lost trades 114
Win Rate 49.33 %
Expected payoff 2.61
Gross Profit 4382.35
Gross Loss -3794.81
Total Net Profit 587.54
-100%
-50%
0%
50%
100%
USD/JPY Jul 2025 - Sep 2025
1.15
Total Trades 176
Won Trades 83
Lost trades 93
Win Rate 47.16 %
Expected payoff 1.50
Gross Profit 2058.33
Gross Loss -1793.76
Total Net Profit 264.57
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
1.12
Total Trades 141
Won Trades 61
Lost trades 80
Win Rate 43.26 %
Expected payoff 1.65
Gross Profit 2146.40
Gross Loss -1913.90
Total Net Profit 232.50
-100%
-50%
0%
50%
100%
EUR/USD Jan 2025 - Jul 2025
0.96
Total Trades 368
Won Trades 165
Lost trades 203
Win Rate 44.84 %
Expected payoff -0.79
Gross Profit 7081.30
Gross Loss -7373.10
Total Net Profit -291.80
-100%
-50%
0%
50%
100%
AUD/USD Oct 2024 - Jan 2025
0.94
Total Trades 69
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -0.84
Gross Profit 830.20
Gross Loss -887.90
Total Net Profit -57.70
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.87
Total Trades 51
Won Trades 17
Lost trades 34
Win Rate 33.33 %
Expected payoff -1.59
Gross Profit 557.30
Gross Loss -638.40
Total Net Profit -81.10
-100%
-50%
0%
50%
100%
GBP/CAD Jan 2025 - Jul 2025
0.84
Total Trades 627
Won Trades 273
Lost trades 354
Win Rate 43.54 %
Expected payoff -1.74
Gross Profit 5809.06
Gross Loss -6901.80
Total Net Profit -1092.74
-100%
-50%
0%
50%
100%
USD/JPY Jan 2025 - Jul 2025
0.82
Total Trades 956
Won Trades 414
Lost trades 542
Win Rate 43.31 %
Expected payoff -1.81
Gross Profit 7932.83
Gross Loss -9665.35
Total Net Profit -1732.52
-100%
-50%
0%
50%
100%
GBP/USD Jan 2025 - Jul 2025
0.80
Total Trades 343
Won Trades 149
Lost trades 194
Win Rate 43.44 %
Expected payoff -3.33
Gross Profit 4599.70
Gross Loss -5741.20
Total Net Profit -1141.50
-100%
-50%
0%
50%
100%
USD/JPY Jul 2025 - Sep 2025
0.80
Total Trades 184
Won Trades 78
Lost trades 106
Win Rate 42.39 %
Expected payoff -2.44
Gross Profit 1815.48
Gross Loss -2265.23
Total Net Profit -449.75
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.79
Total Trades 137
Won Trades 52
Lost trades 85
Win Rate 37.96 %
Expected payoff -4.11
Gross Profit 2115.80
Gross Loss -2679.10
Total Net Profit -563.30
-100%
-50%
0%
50%
100%
AUD/USD Jan 2025 - Jul 2025
0.78
Total Trades 194
Won Trades 71
Lost trades 123
Win Rate 36.60 %
Expected payoff -3.34
Gross Profit 2291.30
Gross Loss -2939.30
Total Net Profit -648.00
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.78
Total Trades 57
Won Trades 21
Lost trades 36
Win Rate 36.84 %
Expected payoff -2.63
Gross Profit 540.90
Gross Loss -690.60
Total Net Profit -149.70
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.76
Total Trades 180
Won Trades 81
Lost trades 99
Win Rate 45.00 %
Expected payoff -2.59
Gross Profit 1446.08
Gross Loss -1912.06
Total Net Profit -465.98
-100%
-50%
0%
50%
100%
GBP/AUD Jan 2025 - Jul 2025
0.75
Total Trades 996
Won Trades 449
Lost trades 547
Win Rate 45.08 %
Expected payoff -2.83
Gross Profit 8400.37
Gross Loss -11222.13
Total Net Profit -2821.76
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.73
Total Trades 93
Won Trades 36
Lost trades 57
Win Rate 38.71 %
Expected payoff -5.39
Gross Profit 1353.10
Gross Loss -1854.10
Total Net Profit -501.00
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.71
Total Trades 62
Won Trades 20
Lost trades 42
Win Rate 32.26 %
Expected payoff -3.31
Gross Profit 497.39
Gross Loss -702.63
Total Net Profit -205.24
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.70
Total Trades 162
Won Trades 59
Lost trades 103
Win Rate 36.42 %
Expected payoff -3.61
Gross Profit 1396.26
Gross Loss -1981.79
Total Net Profit -585.53
-100%
-50%
0%
50%
100%
USD/CAD Jan 2025 - Jul 2025
0.69
Total Trades 341
Won Trades 138
Lost trades 203
Win Rate 40.47 %
Expected payoff -3.66
Gross Profit 2819.46
Gross Loss -4067.78
Total Net Profit -1248.32
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
0.68
Total Trades 98
Won Trades 27
Lost trades 71
Win Rate 27.55 %
Expected payoff -3.89
Gross Profit 827.97
Gross Loss -1208.88
Total Net Profit -380.91
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.68
Total Trades 68
Won Trades 26
Lost trades 42
Win Rate 38.24 %
Expected payoff -5.65
Gross Profit 821.06
Gross Loss -1205.23
Total Net Profit -384.17
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.67
Total Trades 119
Won Trades 46
Lost trades 73
Win Rate 38.66 %
Expected payoff -4.34
Gross Profit 1053.75
Gross Loss -1569.85
Total Net Profit -516.10
-100%
-50%
0%
50%
100%
NZD/USD Jan 2025 - Jul 2025
0.66
Total Trades 155
Won Trades 57
Lost trades 98
Win Rate 36.77 %
Expected payoff -5.84
Gross Profit 1794.50
Gross Loss -2700.10
Total Net Profit -905.60
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.65
Total Trades 117
Won Trades 38
Lost trades 79
Win Rate 32.48 %
Expected payoff -2.96
Gross Profit 645.13
Gross Loss -991.13
Total Net Profit -346.00
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.55
Total Trades 159
Won Trades 51
Lost trades 108
Win Rate 32.08 %
Expected payoff -7.30
Gross Profit 1443.80
Gross Loss -2604.60
Total Net Profit -1160.80
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.50
Total Trades 119
Won Trades 34
Lost trades 85
Win Rate 28.57 %
Expected payoff -5.38
Gross Profit 633.80
Gross Loss -1273.60
Total Net Profit -639.80
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.48
Total Trades 130
Won Trades 37
Lost trades 93
Win Rate 28.46 %
Expected payoff -8.13
Gross Profit 966.43
Gross Loss -2022.85
Total Net Profit -1056.42
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.44
Total Trades 75
Won Trades 21
Lost trades 54
Win Rate 28.00 %
Expected payoff -9.56
Gross Profit 568.50
Gross Loss -1285.50
Total Net Profit -717.00
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.36
Total Trades 132
Won Trades 35
Lost trades 97
Win Rate 26.52 %
Expected payoff -10.60
Gross Profit 772.06
Gross Loss -2171.23
Total Net Profit -1399.17
-100%
-50%
0%
50%
100%

Comments