HLINE Price

 

Hello, does anyone happen to know how I can delete an HLine at a specific price? I understand about iterating over and deleting all objects, as well as about the name that you can specify to search for and/or delete an object. As far as I know, the object delete function only has the parameters "Chart, Name"..

 
Yango :

Hello, does anyone happen to know how I can delete an HLine at a specific price? I understand about iterating over and deleting all objects, as well as about the name that you can specify to search for and/or delete an object. As far as I know, the object delete function only has the parameters "Chart, Name"..

You must iterate through the list of all objects. For each object you get its type (line, circle, rectangle...) and its price.

 
Vladimir Karputov #:

You must iterate through the list of all objects. For each object you get its type (line, circle, rectangle...) and its price.

You just gave me an idea, I'll have a look. Thank you :)

 
but can I delete an HLine if I only have the price?
 
Yango # :
but can I delete an HLine if I only have the price?

Read the post above - I described the algorithm.

 
Vladimir Karputov #:

Read the post above - I described the algorithm.

yes I know that. but I am wondering if I can also delete the object without knowing its name.

 
Yango # :

Да, я знаю это. но мне интересно, могу ли я также удалить объект, не зная его имени.

No, you cannot do this. You must first select an object from the list. After that you should get the name of the object. And only by the name of the object you can access the properties of the object.

At a minimum, you should know: this object is of type "Horizontal Line" and this object has "Price" properties.

After that, you must go through the entire list:

You first select an object from the list.

After that you should get the name of the object.

And only by the name of the object you can access the properties of the object.

 
Vladimir Karputov #:

No, you cannot do this. You must first select an object from the list. After that you should get the name of the object. And only by the name of the object you can access the properties of the object.

At a minimum, you should know: this object is of type "Horizontal Line" and this object has "Price" properties.

After that, you must go through the entire list:

You first select an object from the list.

After that you should get the name of the object.

And only by the name of the object you can access the properties of the object.

ok, thanks a lot for the help!