Can I draw an object that extends beyond the current candle (into the future)?

 

I wanted to draw a box into the space that is farther into the future than the current candle with a script but it doesn't appear to be possible. I have a script to enter into a position and it calculates my entry, stop, target, and position size. I'm a visual guy and would love if it would also draw a red box for the stoploss and a green box for the profit zone. However, I'd like it drawn so that as price develops it moves through these objects. Is it possible to do that with a script? Or would I have to use an EA or something to continue to redraw the boxes for every new candle?

Thanks in advance. Your input is appreciated.

 
Of course, it is possible. Set one coordinate with a future time. Time[0] + n × PeriodSeconds().
 
William Roeder:
Of course, it is possible. Set one coordinate with a future time. Time[0] + n × PeriodSeconds().

Thank you. I'm still having some trouble. Could you tell me what I'm doing wrong? The script works fine. I've been using it for a long time. I'm just now trying to add these objects. When I add these lines to it nothing happens. Mind you, the markets are closed so I know a trade won't be executed, but I assumed that the the object would still be drawn.

   datetime boxStart = Time[5];
   datetime boxEnd = Time[0] + (1000 * PeriodSeconds() );
   
   ObjectCreate(NULL,"StopZone",OBJ_RECTANGLE,0,boxStart,Bid,boxEnd,stopLossLevel);
 
William Roeder #:
Of course, it is possible. Set one coordinate with a future time. Time[0] + n × PeriodSeconds().

  Time[0] + n* PeriodSeconds() its genius!, it was exactly what i needed to finish my indicator code!, thanks alot!

Reason: