#property copyright "DREW"
#property link      "joinme@yandex.ru"

int TF = PERIOD_H4;

int init()
{
   return(0);
}

int deinit()
{
   return(0);
}

int start()
{
   int TH = TimeHour(iTime(NULL,TF,0));
   if(TH == 0 || TH == 4 || TH == 20) return(0);

   /*double CCI = iCCI(NULL,TF,3,PRICE_TYPICAL,0);
   
   if(CCI > 30)
   {
      if(OrdersTotal() == 0) OrderSend(Symbol(),OP_BUY,1,Ask,3,0,Ask+0.0007,"",14774,0,Blue);
   }

   if(CCI < -30)
   {
      if(OrdersTotal() == 0) OrderSend(Symbol(),OP_SELL,1,Bid,3,0,Bid-0.0007,"",14774,0,Red);
   }*/
   
   if((TH == 8 || TH == 12 || TH == 16) && (TimeMinute(iTime(NULL,TF,0)) == 0))
   {
      if(OrdersTotal() == 0)
      {
         OrderSend(Symbol(),OP_BUY,1,Ask,3,0,Ask+0.0010,"",14774,0,Blue);
         OrderSend(Symbol(),OP_SELL,1,Bid,3,0,Bid-0.0010,"",14774,0,Red);
      }
   }

   return(0);
}



