Marbo:
Hi guys,
I open some charts, draw some lines and rectangles and then I drag the following script into one of the charts.
This script should print the names and types of the objects found in all charts. Interestingly, the names are all correct but the object types are all -1 except the objects of the chart I drag the script into.
But why?!?! How can the name be correct and the object type is -1?
This is the script:
Should use
int objType = ObjectGetInteger(ChartID,objName,OBJPROP_TYPE);
instead.
Seng Joo Thio:
Should use
instead.
That works perfect! Thank you very much!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi guys,
I open some charts, draw some lines and rectangles and then I drag the following script into one of the charts.
This script should print the names and types of the objects found in all charts. Interestingly, the names are all correct but the object types are all -1 except the objects of the chart I drag the script into.
But why?!?! How can the name be correct and the object type is -1?
This is the script: