horizontal line - store price in a variable
-
Im trying to create a horizontal line that can be moved around on the chart. I want to store the price of the line into a variable that gets updated as the line gets moved around manually on the chart. I have made the line, but cant seem to get the right output value for the variable. Can anyone see what I do wrong? Here is a link to the project https://fxdreema.com/shared/5LunwNMgd

-
above your variable mod, first you have to reference that name "line" because for each new "line" that is drawn it is given a number with the way you have it configured.
So above the variable mod, theres an orange loop for objects section. Id use select by name, and use the name contains block there instead, or select object by type? by color? the way you're using it is about the only wrong way to reference the way that line is drawn.

-
@tipsywisdom thanks for your answer. I am not sure I understand however. Does this look right? I am not getting any results stored in the variable..

-
I also tried like this, but im still not having any success..

-
I got it now. Here are the settings in case anyone else needs it. Thanks!

-
perfect!! nice work. Sorry i called it select object by name, but the most important was "name contains"