Volume_trader_v2_www.forex-instruments.info

Profit factor:
0.51
Price Data Components
Series array that contains open time of each bar
Orders Execution
Checks for the total of open ordersIt Closes Orders by itself It automatically opens orders when conditions are reached
Miscellaneous
It issuies visual alerts to the screen
12 Views
0 Downloads
0 Favorites
Volume_trader_v2_www.forex-instruments.info
//+------------------------------------------------------------------+
//|                 Developed by www.forex-tsd.com                   |
//|                 Idea from John Taylor v.2.0                      |
//|                                                                  |
//+------------------------------------------------------------------+
#include <stdlib.mqh>
#define MySuperMagic 111020051110
//----
extern int StartHour=8;
extern int EndHour  =20;
extern double Lots =0.1;
//----
double LastBarChecked;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int init()
  {
//---- 
   LastBarChecked=Time[0];
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+  
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
   string cm="Volume ";
   if (Period()==1) cm=cm + "1M";
   if (Period()==5) cm=cm + "5M";
   if (Period()==15) cm=cm + "15M";
   if (Period()==30) cm=cm + "30M";
   if (Period()==60) cm=cm + "1H";
   if (Period()==240) cm=cm + "4H";
   if (Period()==1440) cm=cm + "1D";
   if (Period()==10080) cm=cm + "1W";
   if (Period()==43200) cm=cm + "1M";
   cm=cm + " - ";
   cm=cm + TimeToStr(CurTime(),TIME_DATE|TIME_SECONDS);
   int EAMagic=MySuperMagic + Period();
//------------------------------------------------------------------------------------------------ 
   bool doShort=false;
   bool doLong =false;
   bool hourValid=(Hour()>=StartHour) && (Hour()<=EndHour);
   if((Volume[1] < Volume[2]) && hourValid)
     {
      doLong=true;
      Comment("Up trend");
     }
   if((Volume[1] > Volume[2]) && hourValid)
     {
      doShort=true;
      Comment("Down trend");
     }
   if(Volume[1]==Volume[2] )
     {
      Comment("No trend...");
     }
   if(LastBarChecked!=Time[0])
     {
      int cnt=0;
      while(cnt<OrdersTotal())
        {
         if(OrderSelect (cnt, SELECT_BY_POS)==false) continue;
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==EAMagic)
           {
            int ticket=OrderTicket();
            double oLots=OrderLots();
            double priceClose;
            if (OrderType()==OP_BUY)
              {
               priceClose=Bid;
               if(doLong)
                 {
                  LastBarChecked=Time[0];
                  return(0);
                 }
              }
            else
              {
               priceClose=Ask;
               if(doShort)
                 {
                  LastBarChecked=Time[0];
                  return(0);
                 }
              }
            if(!OrderClose(ticket,oLots,priceClose,7,Red))
              {
               Alert("Error closing trade: " + ErrorDescription(GetLastError()));
               return(0);
              }
           }
         else
           {
            cnt ++;
           }
        }
      if (hourValid)
        {
         if(Volume[1] < Volume[2])
           {
            OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,cm,EAMagic,0,White);
           }
         if(Volume[1] > Volume[2] )
           {
            OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,0,cm,EAMagic,0,Red);
           }
        }
      LastBarChecked=Time[0];
     }
   return(0);
  }
//+------------------------------------------------------------------+

Profitability Reports

USD/JPY Jul 2025 - Sep 2025
0.60
Total Trades 733
Won Trades 269
Lost trades 464
Win Rate 36.70 %
Expected payoff -2.03
Gross Profit 2193.70
Gross Loss -3683.89
Total Net Profit -1490.19
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.46
Total Trades 854
Won Trades 309
Lost trades 545
Win Rate 36.18 %
Expected payoff -2.71
Gross Profit 1941.71
Gross Loss -4253.39
Total Net Profit -2311.68
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.52
Total Trades 795
Won Trades 307
Lost trades 488
Win Rate 38.62 %
Expected payoff -1.46
Gross Profit 1238.52
Gross Loss -2399.08
Total Net Profit -1160.56
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.80
Total Trades 800
Won Trades 358
Lost trades 442
Win Rate 44.75 %
Expected payoff -1.02
Gross Profit 3250.10
Gross Loss -4069.60
Total Net Profit -819.50
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.08
Total Trades 783
Won Trades 78
Lost trades 705
Win Rate 9.96 %
Expected payoff -10.41
Gross Profit 664.38
Gross Loss -8813.81
Total Net Profit -8149.43
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.12
Total Trades 798
Won Trades 132
Lost trades 666
Win Rate 16.54 %
Expected payoff -8.32
Gross Profit 939.75
Gross Loss -7577.89
Total Net Profit -6638.14
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.00
Total Trades 83
Won Trades 38
Lost trades 45
Win Rate 45.78 %
Expected payoff -1270.21
Gross Profit 315.10
Gross Loss -105742.30
Total Net Profit -105427.20
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.54
Total Trades 810
Won Trades 316
Lost trades 494
Win Rate 39.01 %
Expected payoff -1.46
Gross Profit 1405.70
Gross Loss -2589.60
Total Net Profit -1183.90
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
0.59
Total Trades 428
Won Trades 172
Lost trades 256
Win Rate 40.19 %
Expected payoff -1.88
Gross Profit 1181.82
Gross Loss -1986.37
Total Net Profit -804.55
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.86
Total Trades 463
Won Trades 213
Lost trades 250
Win Rate 46.00 %
Expected payoff -0.53
Gross Profit 1472.60
Gross Loss -1719.10
Total Net Profit -246.50
-100%
-50%
0%
50%
100%

Comments