the second time point of the rectangle

 

hi

am traying to make a rectangle using object creat

this is my code

ObjectCreate("rectanglename", OBJ_RECTANGLE, 0,Time[x],High[x],Time[x]+period()*60,Low[x] );

if the first time point of the rectangle is a timedate  

D'2010.10.08 00:00'

i want the second time point of the rectangle to be after 100 bars

what modification to the second time point could me made?

 using Daily chart and H1 chart

any help is appreciated

 
You mean ... change period()*60 to 100 * period()*60 ?
 

hi

thanks for u brewmanz

using your code.

 

100 * period()*60

will draw the second time point of the rectangle after 85 bars not after 100 bars

 

ah! that's because there's no trading @ weekends

Maybe,if x >= 100, replace Time[x]+period()*60 with Time[x-100]

Otherwise, if x < 100, remember that you cannot predict exactly WHEN '100 bars in the future' will happen.

So, you may have to redraw the last 100 bars each tick (or at least on each new bar) to get redrawing

 

ok

thanks for u my frind

i will tray this