Current Bid on right Side-Scale

 

Hello,


I have a problem.

When drawing a horizontal line on any bar, how can I accomplish that I can get the value of the right side scale on which the line points?

Or even how can I draw a label with the value of which the line points.


Thank You.


Kind Regards

 
DougMan:

When drawing a horizontal line on any bar, how can I accomplish that I can get the value of the right side scale on which the line points?

Or even how can I draw a label with the value of which the line points.

You can get the basic idea from this code:

// print prices of all objects of type horizontal line (OBJ_HLINE)
int start() {
   for(int i=0;i<ObjectsTotal();i++) {                      // loop on all objects
      string name=ObjectName(i);
      if ( ObjectType(name)==OBJ_HLINE ) {                     // for objects of type horizantal line
         double price = ObjectGet(name,OBJPROP_PRICE1);              // get price and print
         Print("Object ",name," price: ",DoubleToStr(price,Digits));
        }
     }
  }
 

Thank You for your help.

I know what you mean. But at first I must know the value where the trend-line "hits" the right scale, so that I can draw the horizontal line.

I hope you understand what I mean.

 
DougMan:

Thank You for your help.

I know what you mean. But at first I must know the value where the trend-line "hits" the right scale, so that I can draw the horizontal line.

I hope you understand what I mean.

No, I don't. Give an example.

Reason: