Download MetaTrader 5

Colors of customer indicator

To add comments, please log in or register
dolemi
145
dolemi  

Hi,

  Could I change color of a customer indicator without use extra buffer? And how? I mean one indicator 4 colors.

Carl Schreiber
6989
Carl Schreiber  

In principle yes, but it depends on the 'environment'.

One option would be

#property indicator_color1 Yellow
Alain Verleyen
Moderator
32008
Alain Verleyen  
dolemi:

Hi,

  Could I change color of a customer indicator without use extra buffer? And how? I mean one indicator 4 colors.


You need 4 buffers.
dolemi
145
dolemi  

Any command like this?

   if (a>0)    SetIndexColor(1, clrRed);

   else  SetIndexColor(1, clrGreen);

Keith Watford
Moderator
10369
Keith Watford  
dolemi:

Any command like this?

   if (a>0)    SetIndexColor(1, clrRed);

   else  SetIndexColor(1, clrGreen);

Try it and see what happens
To add comments, please log in or register