color is an integer that ranges from -1 to 16777215, and so it's safe to cast from and to double.
lippmaje:
color is an integer that ranges from -1 to 16777215, and so it's safe to cast from and to double.
color is an integer that ranges from -1 to 16777215, and so it's safe to cast from and to double.
I didn't know that. Thanks!
See also here https://www.mql5.com/en/docs/basis/types/integer/color
Documentation on MQL5: Language Basics / Data Types / Integer Types / Color Type
- www.mql5.com
type is intended for storing information about color and occupies 4 bytes in memory. The first byte is ignored, the remaining 3 bytes contain the RGB-components. Literal representation consists of three parts representing numerical rate values of the three main color components: red, green, blue. The constant starts with C and is enclosed in...
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
So, what I'm trying to do is read values in from a text file and take those values and set them to a global variable.
Deriving Doubles, Integers and bool's from a string value is, setting to a double, and then back to original format in other programs is simple.
The problem I'm having is with the color type. Setting string values for the text file is simple enough. But figuring a way to set them to a double and back is where I'm having a problem.
I'm leaning toward just making my own "table" of values to convert. Unless someone knows some mql4 code to do it.
Any ideas?