I have the codes to draw a horizontal trend line
if(CopyTime(Symbol(), PERIOD_D1, 0, 2, dt) <= 0) return(0);
ObjectCreate(0, objname, OBJ_TREND, 0, dt, price, dt, price);
It draws a horizontal line from today's open hour to yesterday's open hour
but I want to draw from today's open to now (all the way to the right of the chart)
I somehow got it.
I added 24 * 60 * 60 to today's time
I thought what you need is ObjectSetInteger() with OBJPROP_RAY_RIGHT or some PeriodSecond() to the right - click that.
-->> 911 <<--
PeriodSecond() is useful