How to draw object in advance of the zero bar?

 
Hello, friends,
Can I ask if anyone knows how to draw objects in advance of the chart, which is drawing objects in front of the "0" bar as shown in the attached figure. Say, for example, if I used the command line:

ObjectCreate("ArrowTest", OBJ_ARROW, 0, Time[0], High[0]);

How would you setup the Time arry? I tried to disply the contents in the Time array, but it shows a number different than the normal reading of datetime format such as D'2004.01.01 00:00'.

Thank you for the help.
 
xxlai:
Hello, friends,
Can I ask if anyone knows how to draw objects in advance of the chart, which is drawing objects in front of the "0" bar as shown in the attached figure. Say, for example, if I used the command line:

ObjectCreate("ArrowTest", OBJ_ARROW, 0, Time[0], High[0]);

How would you setup the Time arry? I tried to disply the contents in the Time array, but it shows a number different than the normal reading of datetime format such as D'2004.01.01 00:00'.

Thank you for the help.

Hi xxlai

I do exactly that in a EA. You can set the time coordinate greater than the current time. For example, the following will put your arrow one bar to the right of the current bar.

ObjectCreate( "ArrowTest", OBJ_ARROW, 0, Time[0] + Period()*60, High[0] );

Note that you will have to move the arrow when a new bar is started because objects move as the chart advances.

Cheers

Jellybean