Get Color of Gator Indicator

 

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

 

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.

 
William Roeder:

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.
 
revTolution :
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.

 
Vladimir Karputov:

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?
 
revTolution:
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

 
Vladimir Karputov:

Path: [data folder]\MQL5\Indicators\Examples\Gator.mq5

In the example folder I can only find a simple panel folder and inside the simple panel folder an include file and an mq4 files which are not gator..
 
And remember that I'm working on MT4 not MT5
 
revTolution :
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.

Reason: