Author: emsjoflo
Profit factor:
0.68
Orders Execution
Checks for the total of open ordersIt Closes Orders by itself It automatically opens orders when conditions are reached
7 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/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%
USD/CAD Jul 2025 - Sep 2025
0.74
Total Trades 45
Won Trades 13
Lost trades 32
Win Rate 28.89 %
Expected payoff -3.40
Gross Profit 434.32
Gross Loss -587.28
Total Net Profit -152.96
-100%
-50%
0%
50%
100%
NZD/USD 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/USD Jul 2025 - Sep 2025
0.84
Total Trades 43
Won Trades 11
Lost trades 32
Win Rate 25.58 %
Expected payoff -3.87
Gross Profit 882.90
Gross Loss -1049.40
Total Net Profit -166.50
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
1.01
Total Trades 38
Won Trades 8
Lost trades 30
Win Rate 21.05 %
Expected payoff 0.20
Gross Profit 795.83
Gross Loss -788.24
Total Net Profit 7.59
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.67
Total Trades 44
Won Trades 12
Lost trades 32
Win Rate 27.27 %
Expected payoff -7.98
Gross Profit 728.26
Gross Loss -1079.32
Total Net Profit -351.06
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.00
Total Trades 9
Won Trades 1
Lost trades 8
Win Rate 11.11 %
Expected payoff -11750.78
Gross Profit 11.30
Gross Loss -105768.30
Total Net Profit -105757.00
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.36
Total Trades 43
Won Trades 12
Lost trades 31
Win Rate 27.91 %
Expected payoff -13.11
Gross Profit 318.20
Gross Loss -882.00
Total Net Profit -563.80
-100%
-50%
0%
50%
100%
USD/CHF Jan 2025 - Jul 2025
1.02
Total Trades 121
Won Trades 38
Lost trades 83
Win Rate 31.40 %
Expected payoff 0.45
Gross Profit 2776.24
Gross Loss -2721.81
Total Net Profit 54.43
-100%
-50%
0%
50%
100%
NZD/USD Jan 2025 - Jul 2025
0.91
Total Trades 131
Won Trades 43
Lost trades 88
Win Rate 32.82 %
Expected payoff -1.31
Gross Profit 1762.80
Gross Loss -1935.00
Total Net Profit -172.20
-100%
-50%
0%
50%
100%

Comments