Get Color of Gator Indicator
There are no colors in code, only numbers. Stop thinking about colors.
As far as the gator is concerned, there are three lines: 0 - GATORJAW_LINE, 1 - GATORTEETH_LINE, 2 - GATORLIPS_LINE. You figure out which one is red on your settings.
There are no colors in code, only numbers. Stop thinking about colors.
As far as the gator is concerned, there are three lines: 0 - GATORJAW_LINE, 1 - GATORTEETH_LINE, 2 - GATORLIPS_LINE. You figure out which one is red on your settings.
Yes, but how can I practically tell my EA: "If that is red, do this, if that is green, to that other thing"? I would like to be able to distinguish the "Value Up" and the "Value Down" colors of the indicator directly from my code.
There are no colors - :). The indicator color is an illusion. You need to know the algorithm of the indicator in order to make an assumption about its color.
There are no colors - :). The indicator color is an illusion. You need to know the algorithm of the indicator in order to make an assumption about its color.
Okay, I understand, but I need to do that, no matter if it's an illusion or not. I cannot find the source code of that indicator in the folder, can anyone write me some code please to let the EA distinguish the one that I see as a green line and the one I see as a red line?
Path: [data folder]\MQL5\Indicators\Examples\Gator.mq5
Path: [data folder]\MQL5\Indicators\Examples\Gator.mq5
And remember that I'm working on MT4 not MT5
How can we know that you are still sitting at the old terminal? You wrote on the MQL5 forum, you wrote in the main topic - that's why you received answers in MQL5. If you have questions about the old terminal, write in the special section MQL4 and MetaTrader 4
I will postpone your topic.

- Free trading apps
- Free Forex VPS for 24 hours
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi! I'm writing an EA that trades based on every indicator, and I'm at the gator indicator now. I already have a strategy to use it in my code but first I need to know the color of both the upper and the lower line, because the strategy is based on that. I would like a code that stores in two integer-type variables (one for the upper line and one for the lower one) the value "0" if the bar is green and the value "1" if the color is red.
Can anyone help?
Thank you in advance