How to set custom color in the indicator code?

 
 
fxbs:
How to set custom color in the indicator code?

Line “#property indicator_color“ does not allow any numbers…

Thank you.

Have you tried using words btw? Like Red, Blue, etc.

Cheers,

Diam0nd

I LOVE

 
 

Have you tried using words btw? Like Red, Blue, etc.

Thank you for reply!

Sure,

I mean, in script, line "#property indicator_color" allows you put only basic web colors from the table set by words (red, white, blue, etc) and doesn't let you put any custom colors (shades of basic web colors) those are digits.

You can set any custom color through the terminal, but should be some trick to set it from the script and not to do it manually all the time...(lazy)

Diamond, Should be some easy hack, i believe in you!

 

Hi, CJA! when you (I'm) putting digits in the line and start compiling in Metaeditor, it shows error: "defined value expected" dem...

 

Color

fxbs:
Hi, CJA! when you (I'm) putting digits in the line and start compiling in Metaeditor, it shows error: "defined value expected" dem...

You need to have a reference to the color name in the line of code. Look at the supplied screenshot, notice where i have changed the code, actually i have also changed the line color to red. The altered code is the next line just below the 2 gray lines of code //SetIndexStyle etc

Files:
image1.gif  12 kb
 

Cool!

Thank you, CIA, wonderful!

 

plus another method: to add cust.color code (4xmpl C'183,0,0') to "SetIndexStyle" line:

SetIndexStyle(0,DRAW_LINE,0,2,C'183,0,0');

Reason: