How to place a red or green square on a chart ?

 

I wrote a little program calculating volatility.

Currently I use the "comment" command to display the result on my chart. The words OK and NOT OK.

I'd like to replace these words with a green ore red square (or dot)) of about 1 cm size.

I have difficulties to find the right command and program exemplas in order to do that.

Any idea where in the documentation I could find it?

Your help is appreciated.

 
 


while objectcreate() is to be used for this purpose, the organisation of the book does not really make it very clear which object has which properties that need to be set and therefore its very confusing to display the squares, dots or arrows on the screen and then keep them either stationary or move them along the time line with the time line. Would indeed be a great help if someone can shed some light on the various objects and their various properties that need to be set and how exactly to display and move them along the time line.

 
aps:


while objectcreate() is to be used for this purpose, the organisation of the book does not really make it very clear which object has which properties that need to be set and therefore its very confusing to display the squares, dots or arrows on the screen and then keep them either stationary or move them along the time line with the time line. Would indeed be a great help if someone can shed some light on the various objects and their various properties that need to be set and how exactly to display and move them along the time line.

Thanks for your comment.

I looked at the CreateObject command before and thought that for what I want to achieve, this command is not suitable.

Parameters seem to be linked to prices information. So I guess that the object will move when price changes occur on the chart.

I'd like to place a dot always at the same position on the chart. Like the Comment command does. In the upper left corner of the window.

---------------------------------------------------------------------------------

Coordinates must be passed in pairs: time and price. For example, the OBJ_VLINE object needs only time, but price (any value) must be passed, as well.

Parameters:
name - Object unique name.
type - Object type. It can be any of the Object type enumeration values.
window - Index of the window where the object will be added. Window index must exceed or equal to 0 and be less than WindowsTotal().
time1 - Time part of the first point.
price1 - Price part of the first point.
time2 - Time part of the second point.
price2 - Price part of the second point.
time3 - Time part of the third point.
price3 - Price part of the third point.
Reason: