NinaEA





/*-----------------------------+
|			       |
| 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, 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,cbars,from,maP,0,1)-iCustom(NULL,0,"NINA",PeriodWATR,Kwatr,highlow,cbars,from,maP,1,1);


//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 && 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 && 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);
  }
//+------------------------------------------------------------------+



Sample





Analysis



Market Information Used:



Indicator Curves created:


Indicators Used:




Custom Indicators Used:
NINA

Order Management characteristics:
Checks for the total of open orders

It Closes Orders by itself
It automatically opens orders when conditions are reached

Other Features:

BackTest : EURUSD on H1

From 2009-08-01 to 2009-10-01 Profit Factor:0.80 Total Net Profit:-225.68

BackTest : EURUSD on H1

From 2009-11-01 to 2009-11-30 Profit Factor:1.18 Total Net Profit:71.93

BackTest : EURUSD on H1

From 2009-12-01 to 2010-01-17 Profit Factor:0.69 Total Net Profit:-374.14

BackTest : EURUSD on H1

From 2010-03-01 to 2010-03-27 Profit Factor:0.63 Total Net Profit:-230.38

BackTest : EURUSD on H1

From 2010-04-01 to 2010-04-30 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2010-05-01 to 2010-05-31 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2010-06-01 to 2010-06-30 Profit Factor:0.00 Total Net Profit:0.00

BackTest : GBPUSD on H1

From 2010-01-01 to 2010-02-27 Profit Factor:0.73 Total Net Profit:-503.89

BackTest : GBPUSD on H1

From 2010-01-01 to 2010-04-16 Profit Factor:0.39 Total Net Profit:-3312.17

BackTest : USDCAD on H1

From 2009-01-01 to 2010-01-01 Profit Factor:0.53 Total Net Profit:-5518.24

BackTest : USDCAD on H1

From 2009-12-01 to 2010-01-01 Profit Factor:1.00 Total Net Profit:0.39

BackTest : USDCHF on H1

From 2009-12-01 to 2010-01-01 Profit Factor:0.29 Total Net Profit:-490.57

BackTest : USDJPY on H1

From 2009-11-01 to 2009-11-30 Profit Factor:0.79 Total Net Profit:-87.89

Request Backtest for NinaEA


From : (yyyy/mm/dd) To: (yyyy/mm/dd)

Pair: Period: