Change existing chart indicator color in a code?

 

Hey guys,

is it somehow possible to change the color of a moving average in a code?

Example: I have a moving average in my chart. Now I want to press a key and the color of the moving average should change.

 
Only the indicator can change itself. Don't try to write code to change something else — change the indicator.
 
William Roeder:
Only the indicator can change itself. Don't try to write code to change something else — change the indicator.

Ok, thanks! Unfortunately, I can't change/insert/delete an indicator by coding mql4. All the necessary functions are only in mql5.

 
Marbo: Unfortunately, I can't change/insert/delete an indicator by coding mql4. All the necessary functions are only in mql5.

Of course, you can in MT4. Buttons exist, colored lines exist, Events exist.

 
William Roeder:

Of course, you can in MT4. Buttons exist, colored lines exist, Events exist.

Ok, this seems to be beyond my coding abilities. But good to know it's possible. I will figure this out.