Sidus v1





//+------------------------------------------------------------------+
//|                                          Name:     Sidus v1.mq4  |
//|                                         E-mai:  Falmera@mail.ru  |
//|                                           ICQ:        436265161  |
//+------------------------------------------------------------------+

// Ïàðàìåòðû

extern int       FastEMA=23;
extern int       SlowEMA=62;
extern int       FastEMA2=18;
extern int       SlowEMA2=54;
extern int       RSIPeriod=67;
extern int       RSIPeriod2=97;
extern int       b1 = 63;
extern int       c1 = 59;
extern int       b12 = -57;
extern int       c12 = 60;
extern int       pipdiffCurrent2 = 24;
extern int       rsi_sig2 = -97;
extern int       tp=95;
extern int       st=100;
extern int       tp2=17;
extern int       st2=69;
extern double    Lots = 0.50;

//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
int start()
  {
//----
int MagicNumber = 12345;
int MagicNumber2 = 12346;

double ExtMapBuffer1=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,1);
double ExtMapBuffer2=iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,1);
double rsi_sig = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, 1);  
double pipdiffCurrent=(ExtMapBuffer1-ExtMapBuffer2);   
//----
double ExtMapBuffer12=iMA(NULL,0,FastEMA2,0,MODE_EMA,PRICE_CLOSE,1);
double ExtMapBuffer22=iMA(NULL,0,SlowEMA2,0,MODE_EMA,PRICE_CLOSE,1);
double rsi_sig2 = iRSI(NULL, 0, RSIPeriod2, PRICE_CLOSE, 1);  
pipdiffCurrent2=(ExtMapBuffer1-ExtMapBuffer2);
//----
double LotsToBid;
double LotsToBid2;
if (pipdiffCurrent<b1 && rsi_sig<c1)
  {
    if (Volume[0]>10)return(0);
      if(GetActiveOrders(MagicNumber)) return(0);
         OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-st*Point,Ask+tp*Point,"My order 1",MagicNumber,0,Green);   
     }
//-----------------------------------
if (pipdiffCurrent2>b12 && rsi_sig2>c12)
      {
    if (Volume[0]>10)return(0);
      if(GetActiveOrders2(MagicNumber2)) return(0);
        OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+st2*Point,Bid-tp2*Point,"My order 2",MagicNumber2,0,Maroon); 
      }               
               
               
   return(0);
  }
//+------------------------------------------------------------------+
bool GetActiveOrders(int MagicNumber)
{
   for(int i = 0; i < OrdersTotal(); i++)
   {
      // already closed
      if(OrderSelect(i, SELECT_BY_POS) == false) continue;
      // not current symbol
      if(OrderSymbol() != Symbol()) continue;
      // order was opened in another way
      if(OrderMagicNumber() != MagicNumber) continue;
      
      if(OrderType() == OP_SELL || OrderType() == OP_BUY)
      {
         return (true);
      }
   }
   
   return (false);
}
bool GetActiveOrders2(int MagicNumber2)
{
   for(int i = 0; i < OrdersTotal(); i++)
   {
      // already closed
      if(OrderSelect(i, SELECT_BY_POS) == false) continue;
      // not current symbol
      if(OrderSymbol() != Symbol()) continue;
      // order was opened in another way
      if(OrderMagicNumber() != MagicNumber2) continue;
      
      if(OrderType() == OP_SELL || OrderType() == OP_BUY)
      {
         return (true);
      }
   }
   
   return (false);
}






Sample





Analysis



Market Information Used:

Series array that contains tick volumes of each bar


Indicator Curves created:


Indicators Used:

Moving average indicator
Relative strength index


Custom Indicators Used:

Order Management characteristics:
It automatically opens orders when conditions are reached
Checks for the total of open orders


Other Features:

BackTest : EURUSD on H1

From 2009-11-01 to 2009-11-30 Profit Factor:0.87 Total Net Profit:-1410.25

BackTest : USDJPY on H1

From 2009-11-01 to 2009-11-30 Profit Factor:0.56 Total Net Profit:-4275.91

BackTest : EURUSD on H1

From 2009-12-01 to 2010-01-17 Profit Factor:0.57 Total Net Profit:-8761.90

BackTest : USDCAD on H1

From 2009-12-01 to 2010-01-01 Profit Factor:0.40 Total Net Profit:-9347.95

BackTest : EURUSD on H1

From 2009-08-01 to 2009-10-01 Profit Factor:0.68 Total Net Profit:-7838.60

BackTest : GBPUSD on H1

From 2010-01-01 to 2010-02-27 Profit Factor:0.49 Total Net Profit:-9864.25

BackTest : USDCAD on H1

From 2009-01-01 to 2010-01-01 Profit Factor:0.40 Total Net Profit:-9904.66

BackTest : EURUSD on H1

From 2010-03-01 to 2010-03-27 Profit Factor:0.67 Total Net Profit:-3774.40

BackTest : GBPUSD on H1

From 2010-01-01 to 2010-04-16 Profit Factor:0.09 Total Net Profit:-9974.15

BackTest : EURUSD on H1

From 2010-04-01 to 2010-04-30 Profit Factor:0.78 Total Net Profit:-2390.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

Request Backtest for Sidus v1


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

Pair: Period: