SMC Trader Kurt v21

Profit factor:
0.59
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 rangeMoving average indicatorMACD HistogramRelative strength index
12 Views
0 Downloads
0 Favorites
SMC Trader Kurt v21
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+------------------------------------------------------------------+
//|                                      SMC Autotrader Momentum.mq4 |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+

 extern double TakeProfit = 50;
 extern double Lots = 0.1;
 extern double InitialStop = 30;
 extern double TrailingStop = 20;
 
 datetime BarTime;

//#####################################################################
int init()
{
//---- 
//----
   return(0);
  }
//#####################################################################

int start()
  {
   int cnt,total,ticket,MinDist,tmp;
   double Spread;
   double ATR;
   double StopMA;
   double SetupHigh, SetupLow;
   
 
//############################################################################
  if(Bars<100){
     Print("bars less than 100");
     return(0);  
  }
  //exit if not new bar
 if(BarTime == Time[0]) {return(0);}
//new bar, update bartime
 BarTime = Time[0]; 
//#########################################################################################
//~~~~~~~~~~~~~~~~Miscellaneous setup stuff~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ATR =iATR(NULL,0,10,0); // BE CAREFUL OF EFFECTING THE AUTO TRAIL STOPS
 StopMA=iMA(NULL,0,24,0,MODE_SMA,PRICE_CLOSE,0);
 MinDist=MarketInfo(Symbol(),MODE_STOPLEVEL);
 Spread=(Ask-Bid);
//#########################################################################################
 double MA1P1,MA1P2,MA2P1,MA2P2;
 MA1P1= iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,1);
 MA1P2= iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,2);
 MA2P1= iMA(NULL,0,8,0,MODE_EMA,PRICE_CLOSE,1);
 MA2P2= iMA(NULL,0,8,0,MODE_EMA,PRICE_CLOSE,2);

 int MACDMA1,MACDMA2,MACDMA3;
 MACDMA1=12;
 MACDMA2=26;
 MACDMA3=9;
 double MACDP1,MACDP2,MACDSP1,MACDSP2;
 MACDP1  = iMACD(NULL,0,MACDMA1,MACDMA2,MACDMA3,PRICE_CLOSE,MODE_MAIN,1);
 MACDP2  = iMACD(NULL,0,MACDMA1,MACDMA2,MACDMA3,PRICE_CLOSE,MODE_MAIN,2);
 MACDSP1 = iMACD(NULL,0,MACDMA1,MACDMA2,MACDMA3,PRICE_CLOSE,MODE_SIGNAL,1);
 MACDSP2 = iMACD(NULL,0,MACDMA1,MACDMA2,MACDMA3,PRICE_CLOSE,MODE_SIGNAL,2);

 double RSIvalP1,RSIvalP2;
 RSIvalP1 = iRSI(NULL,0,12,PRICE_CLOSE,1);
 RSIvalP2 = iRSI(NULL,0,12,PRICE_CLOSE,2);

//########################################################################################
//##################     ORDER CLOSURE  ###################################################
// If Orders are in force then check for closure against Technicals LONG & SHORT
//CLOSE LONG Entries
  total=OrdersTotal();
  if(total>0)
   { 
   for(cnt=0;cnt<total;cnt++)
   {
    OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
    if(OrderType()==OP_BUY && OrderSymbol()==Symbol())
     {
     if(MA1P2 > MA2P2 && MA1P1 < MA2P1)
      {                                 
       OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet); // close LONG position
     }}

//CLOSE SHORT ENTRIES: 
    OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); 
    if(OrderType()==OP_SELL && OrderSymbol()==Symbol()) // check for symbol
     {
     if(MA1P2 < MA2P2 && MA1P1 >MA2P1)
      {   
       OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet); // close SHORT position
     }}
    }  // for loop return
    }   // close 1st if 
//##############################################################################
//~~~~~~~~~~~ END OF ORDER Closure routines & Stoploss changes  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//##########################################################################################
//~~~~~~~~~~~~START of NEW ORDERS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//#########################  NEW POSITIONS ?  ######################################
//Possibly add in timer to stop multiple entries within Period
// Check Margin available
// ONLY ONE ORDER per SYMBOL
// Loop around orders to check symbol doesn't appear more than once
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 total=OrdersTotal();
  if(total>0)
   { 
    for(cnt=0;cnt<total;cnt++)
     {
      OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
       if(OrderSymbol()==Symbol()) return(0);
   }
   }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   if(AccountFreeMargin()<(1000*Lots))
   {Print("We have no money. Free Margin = ", AccountFreeMargin());
    return(0);}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//#########################################################################################
//ENTRY RULES: LONG 
 if(MA1P2 < MA2P2 && MA1P1 >MA2P1 
    &&
    RSIvalP1 > 50
    &&
    MACDP1 > MACDSP1
    )
  {
   ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,"MaxMin Long",16384,0,Orange); //Bid-(Point*(MinDist+2))
   if(ticket>0)
    {
    if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
     }
     else Print("Error opening BUY order : ",GetLastError()); 
     return(0); 
   } 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//ENTRY RULES: SHORT                                     //################################
 if(MA1P2 > MA2P2 && MA1P1 < MA2P1 
    &&
    RSIvalP1 < 50
    &&
    MACDP1 < MACDSP1
    )
  {
   ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,0,"MaxMin Short",16384,0,Red);
   if(ticket>0)
    {
     if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
      }
      else Print("Error opening SELL order : ",GetLastError()); 
      return(0); 
   }

//####################################################################################
//############               End of PROGRAM                  #########################   
   return(0);
}

Profitability Reports

USD/JPY Jul 2025 - Sep 2025
1.16
Total Trades 99
Won Trades 28
Lost trades 71
Win Rate 28.28 %
Expected payoff 1.25
Gross Profit 912.26
Gross Loss -788.58
Total Net Profit 123.68
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.66
Total Trades 108
Won Trades 30
Lost trades 78
Win Rate 27.78 %
Expected payoff -3.13
Gross Profit 654.28
Gross Loss -992.26
Total Net Profit -337.98
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.57
Total Trades 123
Won Trades 26
Lost trades 97
Win Rate 21.14 %
Expected payoff -2.61
Gross Profit 425.90
Gross Loss -747.03
Total Net Profit -321.13
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.76
Total Trades 98
Won Trades 26
Lost trades 72
Win Rate 26.53 %
Expected payoff -3.09
Gross Profit 942.00
Gross Loss -1244.50
Total Net Profit -302.50
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.15
Total Trades 129
Won Trades 15
Lost trades 114
Win Rate 11.63 %
Expected payoff -14.93
Gross Profit 340.20
Gross Loss -2266.48
Total Net Profit -1926.28
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.31
Total Trades 118
Won Trades 31
Lost trades 87
Win Rate 26.27 %
Expected payoff -9.18
Gross Profit 478.18
Gross Loss -1561.17
Total Net Profit -1082.99
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.97
Total Trades 102
Won Trades 36
Lost trades 66
Win Rate 35.29 %
Expected payoff -0.22
Gross Profit 828.20
Gross Loss -850.40
Total Net Profit -22.20
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.59
Total Trades 117
Won Trades 30
Lost trades 87
Win Rate 25.64 %
Expected payoff -2.85
Gross Profit 479.50
Gross Loss -812.90
Total Net Profit -333.40
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
0.64
Total Trades 56
Won Trades 19
Lost trades 37
Win Rate 33.93 %
Expected payoff -3.16
Gross Profit 315.33
Gross Loss -492.38
Total Net Profit -177.05
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.52
Total Trades 70
Won Trades 19
Lost trades 51
Win Rate 27.14 %
Expected payoff -5.15
Gross Profit 395.50
Gross Loss -756.00
Total Net Profit -360.50
-100%
-50%
0%
50%
100%

Comments