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.
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
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.