change color of objects automatically

 

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

 
Blackriver67:

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


of cource
 
qjol:
of cource

He did ask for 'hints' (pointers) and indicated he has searched..
 
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



 

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.

 

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

Blackriver

Reason: