function RoundToInterval( TimeValue ) {
// ....
// you have to find out content yourself
// ....
result = Hours + NewMinutes * 10000;
return result;
}
function dtconvert( mydate, mytime ) {
return DateTimeConvert( 2, mydate, RoundtoInterval(mytime) );
}
bp = 1.0925;
date1 = 1150716;
time1 = 091808;
sp = 1.0885;
date2 = date1;
time2 = 130552;
tn = TimeNum();
bi = BarIndex();
dt = DateTime();
x0 = LastValue(ValueWhen(dt == dtconvert( date1, time1 ), bi));
y0 = bp;
x1 = LastValue(ValueWhen(dt == dtconvert( date2, time2 ), bi));
y1 = sp;
myline = LineArray( x0, y0, x1, y1, 0, False );
Plot( myline, "Trade Line", colorRed, styleLine, Null, Null, 0, 1, 0 );
Plot( C, "Price", colorDefault, styleCandle );
Title = StrFormat( "{{INTERVAL}} - {{DATE}} - Buy time: %06.0f, Sell time: %06.0f", time1, time2 );