MQL4 - automated forex trading   /  

Forum

Anyone know how to read the value from a graphical object?

Back to topics list To post a new topic, please log in or register

avatar
26
Marty 2006.10.19 17:36 
Hi all,

I want to be able to draw an object (eg a line) and for my code to be able to read the parameters of that line and perform operations based on those parameters. (x1, y1, x2,y2)....Is there such a functionality in mq4?

Thanks in advance
How Not to Fall into Optimization Traps?

How Not to Fall into Optimization Traps?

The article describes the methods of how to understand the tester optimization results better. It also gives some tips that help to avoid "harmful optimization".


avatar
92
ququr 2006.10.19 17:56 
Yup.

Check the Object Functions for the details, but I think you want ObjectGet(), which will let you pull properties for a graphical object. For the line, you'd probably grab OBJPROP_TIME# and OBJPROP_PRICE# for the line (technically "trend"). The list of object types might be useful to for knowing what properties might be available for an object.

Good luck!
--Matt

avatar
Moderator
5198
stringo 2006.10.19 17:57 
See documentation http://docs.mql4.com/objects

See example 'Rotating text'

Search "object"

avatar
26
Marty 2006.10.19 18:01 
Thank you both :)

avatar
26
Marty 2006.10.19 18:21 
Marty wrote:
Thank you both :)

Hmmmmmmmmmmmm....it thinks that OBJPROP_TIME1 of a line is 1.1.1970! Oh what?

avatar
597
irusoh1 2006.10.19 18:48 
ObjectValueByShift and ObjectShiftByValue work well.

avatar
26
Marty 2006.10.19 20:05 
irusoh1 wrote:
ObjectValueByShift and ObjectShiftByValue work well.

What do those do? can't find them in documentation....I suspect they shift objects? That's not what I'm trying to do though.

avatar
597
irusoh1 2006.10.20 00:10 
Sorry

ObjectGetValueByShift and ObjectGetShiftByValue

they give trendline value at certain bar and vice versa

avatar
26
Marty 2006.10.20 18:25 
irusoh1 wrote:
Sorry

ObjectGetValueByShift and ObjectGetShiftByValue

they give trendline value at certain bar and vice versa

Wow. Awesome. And here I am, making convoluted slope calculations! Thanks!

avatar
2
warwick57 2010.10.11 13:52 

Hi,

Can anyone tell me where I can find the source code for the 'Standard Deviation Channel' indicator?

Back to topics list  

To add comments, please log in or register