Trendline values

 

Hi - I written a simple EA to plot a trend line using ObjectCreate and OBJ_TREND, with OBJPROP_RAY_RIGHT set as True. I have variables which return the Time and Price value for the two anchor points.

The trend line is drawn and extends to the right, and I am trying to get the return the trend line value on the extended Ray to the right.

Is there a way to get the trend line value of off the Ray extension? The value is shown if you place the cursor on any point of the Ray extension.

I have tried various things but none successful - ObjectGetValueByTime, ObjectGetValueByShift and adding OBJPROP_PRICE3 to the OBJ_TREND line.

Complete novice and learning as I go so any pointers/examples would be greatly appreciated 

I am using MQL4.

Thanks

Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Methods of Object Binding
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Methods of Object Binding
  • www.mql5.com
Graphical objects Text, Label, Bitmap and Bitmap Label (OBJ_TEXT, OBJ_LABEL, OBJ_BITMAP and OBJ_BITMAP_LABEL) can have one of the 9 different ways of coordinate binding defined by the OBJPROP_ANCHOR property. – defines the chart corner relative to which the anchor point coordinates are specified. Can be one of the...
 
In future please post in the correct section
I will move your topic to the MQL4 and Metatrader 4 section.

 
Keith Watford:
In future please post in the correct section
I will move your topic to the MQL4 and Metatrader 4 section.

Apologies and thank you
 
The Forum link on MQL4 redirects me to MQL5.com so please can you post the link you have moved to topic to?  Thanks 
 
fxalert:
The Forum link on MQL4 redirects me to MQL5.com so please can you post the link you have moved to topic to?  Thanks 

The whole topic has been moved. Your above post is in the topic so you don't need a link. Just continue to post here.

Click on Forum at the top of the page and you will see the list of sections.

 
fxalert: I have tried various things but none successful - ObjectGetValueByTime, ObjectGetValueByShift and adding OBJPROP_PRICE3 to the OBJ_TREND line.
  1. Trend line has no third price, bogus.
  2. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help 2017.04.21
 
William Roeder:
  1. Trend line has no third price, bogus.
  2. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help 2017.04.21
Thanks, answer number 1 was, sadly, expected and since posting I’ve thought of a possible way using more than one OBJ_TREND using high/low of bar 1 or 2 as anchor point 2 for the final plotted trend line. Coupled with a bit of logic to confirm trend line break. If I’m still stuck or work it out I’ll post code into this topic👍
 
Try ObjectGetValueByTime
Reason: