125LimitIBFX






extern double  Lot=1;

extern int jarak=15,target=20,stop=70;
extern int JamMulaiTrading=17,JamSelesaiLimit=23;

int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
        EntryLimit(JamMulaiTrading,JamSelesaiLimit,jarak,target,stop);
//----
   return(0);
  }
//+------------------------------------------------------------------+


void EntryLimit(int jam,int selesai,int delta,int TP,int SL)
{   
   if (TimeHour(TimeCurrent())==selesai && ( ChkJmlTrd(2)>0 || ChkJmlTrd(3)>0)) DeleteSemuaLimitOrder();
   if (TimeHour(TimeCurrent())<selesai && TimeHour(TimeCurrent())>=jam && ChkJmlTrd(2)==0 && ChkJmlTrd(0)==0)
      OrderSend(Symbol(),OP_BUYLIMIT,Lot,Bid-delta*Point,0,Bid-(delta+SL)*Point,Bid+(TP-delta)*Point,"LB",0,0,Blue);
      
    if (TimeHour(TimeCurrent())<selesai && TimeHour(TimeCurrent())>=jam && ChkJmlTrd(3)==0 && ChkJmlTrd(1)==0) 
      OrderSend(Symbol(),OP_SELLLIMIT,Lot,Bid+delta*Point,0,Bid+(SL+delta)*Point,Bid+(delta-TP)*Point,"LS",0, 0,Red);
}

int ChkJmlTrd(int mode)//, int MagicEA)
{
   //Constant        Value Description 
   //--------        ----- ----------------------------
   //OP_BUY          0     Buying position. 
   //OP_SELL         1     Selling position. 
   //OP_BUYLIMIT     2     Buy limit pending position. 
   //OP_SELLLIMIT    3     Sell limit pending position. 
   //OP_BUYSTOP      4     Buy stop pending position. 
   //OP_SELLSTOP     5     Sell stop pending position. 

   //--------        ----- ----------------------------
   int i, JmlTrd;
   for (i=0; i<OrdersTotal(); i++)
   {
      OrderSelect(i,SELECT_BY_POS, MODE_TRADES);
      if(OrderType()==mode && OrderSymbol()==Symbol())// && OrderMagicNumber()==MagicEA)
      {
         JmlTrd++;
      }
   }
   return(JmlTrd);
}

void DeleteSemuaLimitOrder()
{
   int i;
   for(i = OrdersTotal(); i >= 0; i--)
   {
      OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
      if((OrderType()==OP_BUYLIMIT || OrderType()==OP_SELLLIMIT) && OrderSymbol()==Symbol())  
      {
         OrderDelete(OrderTicket()); 
      }
   }
}







Sample





Analysis



Market Information Used:



Indicator Curves created:


Indicators Used:



Custom Indicators Used:

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


Other Features:

BackTest : USDJPY on H1

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

BackTest : EURUSD on H1

From 2009-12-01 to 2010-01-17 Profit Factor:0.24 Total Net Profit:-5189.60

BackTest : USDCAD on H1

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

BackTest : EURUSD on H1

From 2009-08-01 to 2009-10-01 Profit Factor:0.30 Total Net Profit:-6970.00

BackTest : GBPUSD on H1

From 2010-01-01 to 2010-02-27 Profit Factor:0.00 Total Net Profit:0.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

Request Backtest for 125LimitIBFX


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

Pair: Period: