By setting the Chart ID parameter in the ObjectGet function.
You can use the ChartFirst() and ChartNext() functions to step through the charts and obtain their ID.double ObjectGetDouble( long chart_id, // chart identifier string object_name, // object name int prop_id, // property identifier int prop_modifier=0 // property modifier, if required );
- docs.mql4.com
Hi dear Fernando. Thank you for your reply., my question is about OBJECT VALUE(ObjectGetValueByTime function), not Object Property.
In order to receive the object value on a different chart which code should be used?
In this link https://docs.mql4.com/objects/objectgetvaluebytime written "a synchronous call is used"....
I don't have any idea about the synchronous call in mql4. do you know what is this? and how can I solve my problem?
I just want to get an object value of a chart from other chart. How can I do it?!(object value, not object property! ------->>>ie. using ObjectGetValueByTime function)
- docs.mql4.com
Hi dear Fernando. Thank you for your reply., my question is about OBJECT VALUE(ObjectGetValueByTime function), not Object Property.
In order to receive the object value on a different chart which code should be used?
In this link https://docs.mql4.com/objects/objectgetvaluebytime written "a synchronous call is used"....
I don't have any idea about the synchronous call in mql4. do you know what is this? and how can I solve my problem?
I just want to get an object value of a chart from other chart. How can I do it?!(object value, not object property!)
I just used ObjectGetDouble() as an example but the same applies to any other ObjectGet function. My answer is still the same and valid so read it again and follow the links to the documentation and look at the examples:
double ObjectGetValueByTime( long chart_id, // chart ID string object_name, // object name datetime time, // time int line_id=0 // line ID );
I just used ObjectGetDouble() as an example but the same applies to any other ObjectGet function. My answer is still the same and valid so read it again and follow the links to the documentation and look at the examples:
I have two charts, I run the EA in first and then go to the next chart. when I select the other chart, the function related to" object get value" does not work correctly and return the old value of object when I selected it's chart. So always I have to select one chart? that's not true situation. please help :(
So then show your code attempt so we can see what might be wrong! Also, show screenshots and explain the situation in more detail.
Dear Fernando, I found the problem. As I said previously, I'm working with several charts at the same time. There are several objects(for ex. regression channel or etc.) inside charts and their sub-windows and each object is moving each time a new candle is formed. So object values are updated dynamically with ticks. But there is a problem in getting values. I found out when a chart is minimized in MT4 platform, it's object values are not updated and have their old values as long as the respective chart is minimized. So I can solve this problem with cascaded windows arrangement.
If you have any idea about this problem, please explain for me.
Thank you for the time you spend for me. :)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
In multiple chart applications, how do you get the objects value of a chart other than the current one?!!!
thanks...