Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi People!
Here i have a MA Indicator what change the Linecolor in red, green or yellow.
For using in a other indicator i try to read out the color State of the Line.
I love the smooth behavior of this indicator.
Also the yellow State is a perfect hysteresis for my purposes.
At the bottom of the code you can see how the Color Buffers are working.
But my idea to set a variable "LineColor" and write it to a Global Variable does not work.
When i print the value of "LineColor", the printed value changes every second between 1 (green) and 2 (red), i never see 3 (yellow).
But on screen the colors are always stable.
Have anyone a idea how i can get the stable colorstate of this indicator?
Thanks a lot and best Regards from Germany,
Michael