Competition





#property copyright "Copyright © 2006, Peradze Gulik."
extern int     Bars_Open_Level = 50;
int            MaxOrders = 3,LastBars = 0,Last_Oper;
double         Min_Open_Low,Max_Open_High;
int init()
{
 Last_Oper = CurTime() - 60;
 return(0);
}
int deinit()
{
 return(0);
}
int start()
{
 int Tmp,Lots = 0;
 if(Bars < 100) return(0);
 if(LastBars != Bars)
 {
  LastBars = Bars;
  Min_Open_Low = 0;
  Max_Open_High = 0;
  for(Tmp = 0;Tmp < Bars_Open_Level;Tmp++)
  {
   if(Max_Open_High < High[Tmp] || Max_Open_High == 0) Max_Open_High = High[Tmp];
   if(Min_Open_Low > Low[Tmp] || Min_Open_Low == 0) Min_Open_Low = Low[Tmp];
  }
 }
 if(OrdersTotal() < MaxOrders && Last_Oper + 60 <= CurTime())
 {
  if(AccountFreeMargin() > 2500) Lots = 2;
  else if(AccountFreeMargin() > 1500) Lots = 1;
  if(Close[0] > Max_Open_High && Lots != 0)
  {
   OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask + 50 * Point,Bid - 20 * Point,"",0,0,Red);
   Last_Oper = CurTime();
  }
  if(Close[0] < Min_Open_Low && Lots != 0)
  {
   OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid - 50 * Point,Ask + 20 * Point,"",0,0,Green);
   Last_Oper = CurTime();
  }
 }
 return(0);
}





Sample





Analysis



Market Information Used:

Series array that contains the highest prices of each bar
Series array that contains the lowest prices of each bar
Series array that contains close prices for each bar


Indicator Curves created:


Indicators Used:



Custom Indicators Used:

Order Management characteristics:
Checks for the total of open orders
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.42 Total Net Profit:-8522.00

BackTest : EURUSD on H1

From 2009-12-01 to 2010-01-17 Profit Factor:0.91 Total Net Profit:-1950.00

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.64 Total Net Profit:-8540.00

BackTest : USDCAD on H1

From 2009-12-01 to 2010-01-01 Profit Factor:0.07 Total Net Profit:-8596.87

BackTest : USDCHF on H1

From 2009-12-01 to 2010-01-01 Profit Factor:0.31 Total Net Profit:-8535.20

BackTest : USDJPY on H1

From 2009-11-01 to 2009-11-30 Profit Factor:0.33 Total Net Profit:-8533.11

Request Backtest for Competition


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

Pair: Period: