Drawing trend line by giving x & y coordinates as input

My requirement is to draw a trendline/line by giving x & y coordinates as input. following code creates a line but its y & x coordinates are totally misplaced. in a 5 min tf chart to draw a line left extended from pts -
30 nov 2017 9:20 am , 10314.2 to point 01 Jan 2018 9:15 am , 10533.3.
for x, i did some conversion as per formula given in AFL help but issue is line is not taking these coordinates. Pl help.Line%20drawn

==============CODE====================
x0= 1171130092000;
//11/30/2017 9:20:00 AM
//Date conversion by formula - 10000 * (year - 1900) + 100 * month + day

y0= 10314.2;

x1= 1180101091500;
//01/01/2018 9:15:00 AM

y1= 10533.3;

Line = LineArray( x0, y0, x1, y1, 2 );
Plot(C, "C", colorWhite, styleCandle);
Plot( Line, "Trend line", colorRed );

Refer this Post,

@Gloriafilamino , Thanks for the replied thread. Though there was no ready made answer in it but after lot of trial and error I was able to resolve my own query. And here is the code-

highOfDay = TimeFrameGetPrice( "H", inDaily );
lowOfDay = TimeFrameGetPrice( "L", inDaily );

//x coordinate is actuall a bar number , just count bar number from left to right and deduct 1 to get desired line //from x coordinate. y is off course price.

x0=91;
y0=9963.8;
x1=819;
y1=10533.5;

Line = LineArray( x0, y0, x1, y1, 2 );

Plot( Line, "Trend line", colorRed );