#property indicator_chart_window
extern color DayMAXcolor=Blue;
extern color DayMINcolor=Red;
extern int DayMAXstyle=0;
extern int DayMINstyle=0;
double status;
string Dmax;
string Dmin;
int init()
{
Dmax=DoubleToStr(GetTickCount(), 5);
Dmin=DoubleToStr(GetTickCount()/2., 5);
ObjectCreate(Dmax,OBJ_HLINE,0,0,iHigh(Symbol(),PERIOD_D1,1),0,0,0);
ObjectCreate(Dmin,OBJ_HLINE,0,0,iLow(Symbol(),PERIOD_D1,1),0,0,0);
ObjectSet(Dmax,OBJPROP_COLOR,DayMAXcolor);
ObjectSet(Dmin,OBJPROP_COLOR,DayMINcolor);
ObjectSet(Dmax,OBJPROP_STYLE,DayMAXstyle);
ObjectSet(Dmin,OBJPROP_STYLE,DayMINstyle);
return(0);
}
int deinit()
{
ObjectDelete(Dmax);
ObjectDelete(Dmin);
return(0);
}
int start()
{
if(status!=Time[1])
{
ObjectMove(Dmax,0,Time[1],iHigh(Symbol(),PERIOD_D1,1));
ObjectMove(Dmin,0,Time[1],iLow(Symbol(),PERIOD_D1,1));
WindowRedraw();
}
status=Time[1];
return(0);
}
//+------------------------------------------------------------------+