change the color of a block using
-
@uchiha can you share the solution with custom block?
Thanks -
Hello
I have a "color" variable, I want to change the color of my rectangle box based on certain conditions, I noticed there's no options in the "value" part of the conditions block.
Is there a work around or some custom code I can use.
Things I have tried
- using the Value === Text Option
- using the Value === Text (code input) Option
Both by directly typing the color I want Example: Blue
-
Nevermind a simple custom code block and google did the trick

-
"color" is an integer data type, the values are integer (whole) numbers. Here all colors are listed: https://docs.mql4.com/constants/objectc ... /webcolors Yes, they appear as text values, but these are all names of predefined constants in MQL4
-
Does this mean we can use these types
0xFFFFFF // White
16777215 // White
0x008000 // Green
32768 // Greenin the [Value ===> Numerical] field?
-
I never tried that, but if they wrote those rules here, it's probably possible https://docs.mql4.com/basis/types/integer/color