/*
const long chart_ID=0, // chart's ID
const int sub_window=0, // subwindow index
ObjectCreate(chart_ID,name,OBJ_TREND,sub_window,time1,price1,time2,price2)
*/
void SetTLine(string name, int timeFrame, datetime time1, double price1, datetime time2,double price2, color clr = Green, int style = 0, int width = 0)
{
//Print("method-> ", "SetTLine ");
ObjectCreate(0,name, OBJ_TREND, 0, 0, time1,price1,time2,price2);
ObjectSet(name, OBJPROP_TIME1, time1);
ObjectSet(name, OBJPROP_PRICE1, price1);
ObjectSet(name, OBJPROP_TIME2, time2+1); //##########
ObjectSet(name, OBJPROP_PRICE2, price2);
ObjectSet(name, OBJPROP_STYLE, style);
ObjectSet(name, OBJPROP_RAY, RayProject);
ObjectSet(name, OBJPROP_COLOR, clr);
ObjectSet(name, OBJPROP_WIDTH, width);
ObjectSet(name, OBJPROP_TIMEFRAMES, timeFrame);
//ObjectSet(name, OBJPROP_TIMEFRAMES, 0);
ObjectSetText(name,DayOfWeekName(time1)+" "+TimeDay(time1)+" "+MonthName(time1)+" "+TimeYear(time1),8,"Arial",Black);
}