Author: emsjoflo
Profit factor:
0.65
Orders Execution
Checks for the total of open ordersIt Closes Orders by itself It automatically opens orders when conditions are reached
10 Views
0 Downloads
0 Favorites
NinaEAtest
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+------------------------------------------------------------------+
//|                                                        NinaEA.mq4 |
//|                                                         emsjoflo |
//|                                  automaticforex.invisionzone.com |
//+------------------------------------------------------------------+
#property copyright "emsjoflo"
#property link      "automaticforex.invisionzone.com"

//---- input parameters
extern int       PeriodWATR=10;
extern double    Kwatr=1;
extern int       highlow=0;
extern int       cbars = 1000;
extern int       from  = 0;
extern int       maP  = 50;
extern double    lots=0.1;
extern int       SMAspread=0;
extern int       StopLoss=0;
extern int       Slippage=4;
double   nina, ninapast, SL=0;
int      i, buys, sells;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
//get moving average info
nina = iCustom(NULL,0,"NINA",PeriodWATR,Kwatr,highlow,0,1)-iCustom(NULL,0,"NINA",PeriodWATR,Kwatr,highlow,1,1);
ninapast = iCustom(NULL,0,"NINA",PeriodWATR,Kwatr,highlow,0,2)-iCustom(NULL,0,"NINA",PeriodWATR,Kwatr,highlow,1,2);

//check for open orders first 
if (OrdersTotal()>0)
   {
   buys=0;
   sells=0;
   for (i=0;i<OrdersTotal();i++)
      {
      OrderSelect(i,SELECT_BY_POS);
      if (OrderSymbol()==Symbol())
         {
         if (OrderType()== OP_BUY)
            {
            if (nina <= 0) OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,Orange);
            else buys++;
            }
         if (OrderType()== OP_SELL) 
            {
            if (nina >= 0) OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,Yellow);
            else sells++;
            }
         }
      }
   }
if (nina >= 0 && ninapast < 0 && buys == 0)
   {
   Print("Buy condition");
   if (StopLoss >1) SL=Ask-StopLoss*Point;
   OrderSend(Symbol(),OP_BUY,lots,Ask,Slippage,0/*(Ask-StopLoss*Point)*/,0,"NinaEA",123,0,Green);
   }
if (nina <= 0 && ninapast > 0 && sells ==0)
   {
   Print ("Sell condition");
   if (StopLoss>1) SL=Bid+StopLoss*Point;
   OrderSend(Symbol(),OP_SELL,lots,Bid,Slippage,0/*(Bid+StopLoss*Point)*/,0,"NinaEA",123,0,Red);
   }   
   
   
   
//----
   return(0);
  }
//+------------------------------------------------------------------+

Profitability Reports

USD/JPY Jul 2025 - Sep 2025
0.91
Total Trades 92
Won Trades 31
Lost trades 61
Win Rate 33.70 %
Expected payoff -1.22
Gross Profit 1118.11
Gross Loss -1230.44
Total Net Profit -112.33
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.43
Total Trades 88
Won Trades 19
Lost trades 69
Win Rate 21.59 %
Expected payoff -10.33
Gross Profit 698.32
Gross Loss -1607.66
Total Net Profit -909.34
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.58
Total Trades 93
Won Trades 24
Lost trades 69
Win Rate 25.81 %
Expected payoff -4.20
Gross Profit 534.85
Gross Loss -925.41
Total Net Profit -390.56
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.10
Total Trades 3748
Won Trades 25
Lost trades 3723
Win Rate 0.67 %
Expected payoff -1.62
Gross Profit 664.10
Gross Loss -6723.70
Total Net Profit -6059.60
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
1.12
Total Trades 73
Won Trades 25
Lost trades 48
Win Rate 34.25 %
Expected payoff 1.82
Gross Profit 1250.70
Gross Loss -1117.60
Total Net Profit 133.10
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.52
Total Trades 80
Won Trades 16
Lost trades 64
Win Rate 20.00 %
Expected payoff -9.66
Gross Profit 840.22
Gross Loss -1613.03
Total Net Profit -772.81
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.85
Total Trades 94
Won Trades 32
Lost trades 62
Win Rate 34.04 %
Expected payoff -2.08
Gross Profit 1075.21
Gross Loss -1270.91
Total Net Profit -195.70
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.00
Total Trades 13
Won Trades 2
Lost trades 11
Win Rate 15.38 %
Expected payoff -8118.93
Gross Profit 13.30
Gross Loss -105559.40
Total Net Profit -105546.10
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.80
Total Trades 81
Won Trades 26
Lost trades 55
Win Rate 32.10 %
Expected payoff -2.06
Gross Profit 672.00
Gross Loss -839.20
Total Net Profit -167.20
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.48
Total Trades 41
Won Trades 9
Lost trades 32
Win Rate 21.95 %
Expected payoff -12.00
Gross Profit 460.64
Gross Loss -952.59
Total Net Profit -491.95
-100%
-50%
0%
50%
100%

Comments