Download MetaTrader 5

change color of objects automatically

To add comments, please log in or register
Blackriver67
124
Blackriver67  

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
3245
qjol  
Blackriver67:

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


of cource
ydrol
590
ydrol  
qjol:
of cource

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

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
124
Blackriver67  

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