Download MetaTrader 5

change color of objects automatically

To add comments, please log in or register
Blackriver67
119
Blackriver67 2014.03.20 12:23 

Hi there,

I have been using MT4 for quite some while and do also some minor MQL4 programing. This brings me to my question because I have not found anything relevant within the MQL4 community:

Is it possible to make a script, where the script searches for graphical objects like rectangles and changes the color of the e.g. blue colored ones into green automatically?

Many thanks for any hints!

Blackriver

qjol
3243
qjol 2014.03.20 12:34  
Blackriver67:

Is it possible to make a script, [...]


of cource
ydrol
593
ydrol 2014.03.20 12:48  
qjol:
of cource

He did ask for 'hints' (pointers) and indicated he has searched..
qjol
3243
qjol 2014.03.20 13:04  
ydrol:

He did ask for 'hints' (pointers) and indicated he has searched..

ho just a hint... OK

for(...) // ObjectsTotal()
if (object == the object you looking for)
ObjectSet(....);//set the color you want



Keith Watford
Moderator
9639
Keith Watford 2014.03.20 13:37  

You can search through the objects and use

ObJectGet()

or ObjectGetInteger()

to get the object's property and then give the property a new value if necessary.

Blackriver67
119
Blackriver67 2014.03.20 18:56  

Many thanks to all of you. I got it now and know where to look further...

Blackriver

To add comments, please log in or register