void OnInit() {
string obj_name = "testobj";
int chart_id = 0;
ObjectsDeleteAll();
ObjectCreate(chart_id,obj_name,
OBJ_BITMAP,
0,
Time[0] + (Period()*60*3),
Close[0]
);
ObjectSetInteger(chart_id,obj_name,OBJPROP_BACK,false);
ObjectSetInteger(chart_id,obj_name,OBJPROP_SELECTABLE,false);
ObjectSetInteger(chart_id,obj_name,OBJPROP_SELECTED,false);
ObjectSetInteger(chart_id,obj_name,OBJPROP_HIDDEN,true);
ObjectSetInteger(chart_id,obj_name,OBJPROP_ZORDER,0);
ObjectSetString(chart_id,obj_name,OBJPROP_BMPFILE,"\\Include\\Controls\\res\\CloseOn.bmp");
ObjectSetInteger(chart_id,obj_name,OBJPROP_XOFFSET,5);
ObjectSetInteger(chart_id,obj_name,OBJPROP_YOFFSET,5);
ObjectSetInteger(chart_id,obj_name,OBJPROP_XSIZE,10);
ObjectSetInteger(chart_id,obj_name,OBJPROP_YSIZE,10);
}