Colors of customer indicator

 

Hi,

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

 

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

One option would be

#property indicator_color1 Yellow
 
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.
 

Any command like this?

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

   else  SetIndexColor(1, clrGreen);

 
dolemi:

Any command like this?

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

   else  SetIndexColor(1, clrGreen);

Try it and see what happens
Reason: