ADXCROSSautotrade2

Author: Perky_z@yahoo.com
Profit factor:
0.90
Orders Execution
Checks for the total of open ordersIt can change open orders parameters, due to possible stepping strategyIt Closes Orders by itself It automatically opens orders when conditions are reached
Indicators Used
Movement directional index
6 Views
0 Downloads
0 Favorites
ADXCROSSautotrade2
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+------------------------------------------------------------------+
//|                                             ADXcross EXPERT      |
//|                                                     Perky_z      |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Perky_z@yahoo.com                                    "
#property link      "http://groups.yahoo.com/group/MetaTrader_Experts_and_Indicators/"
//+--------------------------------------------------------------------------------------------------+
//|  Alerts in hand with ADXcrosses Indicator they dont need to be run together                       |
//+--------------------------------------------------------------------------------------------------+
// Alerts on cross of + and - DI lines
// I use it on 15 min charts
// though looks good on any time frame
// use other indicators to confirm this trigger tho

//---- input parameters


extern double    Lots=0.1;
extern int       Stoploss=50;
extern int       TakeProfit=999;
extern double    TrailingStop = 0;
extern int       Slip=5;



//----
double b4plusdi,b4minusdi,nowplusdi,nowminusdi,Opentrades,cnt,total,TradesInThisSymbol;


//---- indicators




//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
//| Setting internal variables for quick access to data              |
//+------------------------------------------------------------------+
int start()
  {
  
   //if (Opentrades!=0)  //and iATR(5,2)<StopLoss*Point 
   
     //{
      total=OrdersTotal();
   TradesInThisSymbol=0;
     
      for(cnt=0;cnt<total;cnt++)
        {
         if ( OrderSelect (cnt, SELECT_BY_POS) == false )  continue;
         if ( OrderSymbol() != Symbol())  continue;
         if((OrderType() == OP_BUY || OrderType() == OP_BUYSTOP) && (OrderSymbol()==Symbol()))
             {
                TradesInThisSymbol++;
                if(TrailingStop>0) 
                  {                
                   if(Bid-OrderOpenPrice()>Point*TrailingStop)
                     {
                      if(OrderStopLoss()<Bid-Point*TrailingStop)
                        {
                         OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Aqua);
                         //return(0);
                        }
                     }
                  }
                break;
             }
         if((OrderType() == OP_SELL || OrderType() == OP_SELLSTOP) && (OrderSymbol()==Symbol()))
             {
                TradesInThisSymbol++;
                if(TrailingStop>0)  
                  {                
                   if((OrderOpenPrice()-Ask)>(Point*TrailingStop))
                     {
                      if(OrderStopLoss()==0.0 || 
                         OrderStopLoss()>(Ask+Point*TrailingStop))
                        {
                         OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Aqua);
                         //return(0);
                        }
                     }
                  }
               break;
             }
        }
   
   //if (Opentrades==0)  //and iATR(5,2)<StopLoss*Point 
   
     //{
  
   
  
         b4plusdi=iADX(NULL,0,14,PRICE_CLOSE,MODE_PLUSDI,2);
         nowplusdi=iADX(NULL,0,14,PRICE_CLOSE,MODE_PLUSDI,1);
   
         b4minusdi=iADX(NULL,0,14,PRICE_CLOSE,MODE_MINUSDI,2);
         nowminusdi=iADX(NULL,0,14,PRICE_CLOSE,MODE_MINUSDI,1);
   
      //Comment (nowplusdi);
      //+------------------------------------------------------------------+
      //| Money Management mm=0(lots) mm=-1(Mini) mm=1(full compounding)   |
      //+------------------------------------------------------------------+   
   
   
      //----

      //+------------------------------------------------------------------+
      //|                                                                  |
      //+------------------------------------------------------------------+
   
   
         if(b4plusdi>b4minusdi &&
               nowplusdi<nowminusdi)
            {
            //Alert(Symbol()," ",Period()," ADX SELLING");
            if (TradesInThisSymbol>0)
               {
               if(OrderType() == OP_BUY)
                  {
                  OrderClose(OrderTicket(),OrderLots(),Bid,Slip,Violet); 
                  //return(0);
                  }
                  else return(0);
               }
            OrderSend(Symbol(),OP_SELL,Lots,Bid,Slip,Bid+Stoploss*Point,Bid-TakeProfit*Point,"ADX",0,0,Red);
            }   
         if(b4plusdi<b4minusdi &&
            nowplusdi>nowminusdi)
             {
            if (TradesInThisSymbol>0)
               {
               if(OrderType() == OP_SELL)
                  {
                  OrderClose(OrderTicket(),OrderLots(),Ask,Slip,Violet); 
                  //return(0);
                  }
                  else return(0);
               }
               //Alert(Symbol()," ",Period()," ADX BUYING");
               OrderSend(Symbol(),OP_BUY,Lots,Ask,Slip,Ask-Stoploss*Point,Ask+TakeProfit*Point,"ADX",0,0,White);
              }
        
     
            //}
      //}
   return(0);
   }
  // }
   
  
 


Profitability Reports

USD/CAD Jul 2025 - Sep 2025
0.43
Total Trades 793
Won Trades 113
Lost trades 680
Win Rate 14.25 %
Expected payoff -1.62
Gross Profit 950.59
Gross Loss -2231.31
Total Net Profit -1280.72
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.52
Total Trades 655
Won Trades 110
Lost trades 545
Win Rate 16.79 %
Expected payoff -1.77
Gross Profit 1242.40
Gross Loss -2399.90
Total Net Profit -1157.50
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.40
Total Trades 1202
Won Trades 113
Lost trades 1089
Win Rate 9.40 %
Expected payoff -2.60
Gross Profit 2102.60
Gross Loss -5229.80
Total Net Profit -3127.20
-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.07
Total Trades 3356
Won Trades 46
Lost trades 3310
Win Rate 1.37 %
Expected payoff -2.97
Gross Profit 773.51
Gross Loss -10736.03
Total Net Profit -9962.52
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
6.49
Total Trades 1225
Won Trades 374
Lost trades 851
Win Rate 30.53 %
Expected payoff 18.12
Gross Profit 26237.70
Gross Loss -4045.60
Total Net Profit 22192.10
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.62
Total Trades 655
Won Trades 123
Lost trades 532
Win Rate 18.78 %
Expected payoff -1.34
Gross Profit 1400.20
Gross Loss -2275.80
Total Net Profit -875.60
-100%
-50%
0%
50%
100%
USD/CHF Oct 2024 - Jan 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%
USD/CAD Oct 2024 - Jan 2025
0.46
Total Trades 498
Won Trades 49
Lost trades 449
Win Rate 9.84 %
Expected payoff -1.67
Gross Profit 719.11
Gross Loss -1549.49
Total Net Profit -830.38
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.22
Total Trades 856
Won Trades 58
Lost trades 798
Win Rate 6.78 %
Expected payoff -3.57
Gross Profit 850.50
Gross Loss -3906.10
Total Net Profit -3055.60
-100%
-50%
0%
50%
100%

Comments