//+------------------------------------------------------------------+
//| купить если белая.mq4 |
//| Copyright 2012, MetaQuotes Software Corp. |
//| |
//+------------------------------------------------------------------+
#property copyright "Copyright 2012, MetaQuotes Software Corp."
#property link ""
extern int BHOUR = 1;
extern int BMIN = 0;
extern int TP = 50;
extern double Lot = 0.1;
int ticket_buy,time_op;
int start()
{
//купить если белая
if(Close[1] > Open[1])
if(Hour()==BHOUR&&Minute()>=BMIN)
{
if(ticket_buy==0)
{
ticket_buy=OrderSend(Symbol(),OP_BUY,Lot,Ask ,1,0,Ask+TP*Point,"Открытие по времени",89584,0,Green);
time_op=BHOUR;
}
}
//--------------------------------------------------------------------
if(time_op==Hour())
{
return(0);
}else
{
ticket_buy=0;
}
return(0);
}
//+------------------------------------------------------------------+