get the color of a particular current candle in mq5

 

Hi guyz, in my chart, i used the green color for bullish candles and red for bearish candles,
so i need help getting the current opening candle colors to use with my EA but i dont seem to get a way to code it.
i tried to use the chartgetinteger but it now working as i want it.

Let assumne am in a 5m timeframe, if a candle closes and the new opening candle is a bulish candle it should return green and else return red

Thanks.

 
Aycom366 bamigboye :

Hi guyz, in my chart, i used the green color for bullish candles and red for bearish candles,
so i need help getting the current opening candle colors to use with my EA but i dont seem to get a way to code it.
i tried to use the chartgetinteger but it now working as i want it.

Let assumne am in a 5m timeframe, if a candle closes and the new opening candle is a bulish candle it should return green and else return red

Thanks.

The Expert Advisor does not see the color, but the Expert Advisor very simply compares the opening price and the closing price. Compare the opening and closing prices and you will always know: is it a bearish candle or is it a bullish candle.

 
can u give me like a hiint of how to go about it?
 
Aycom366 bamigboye:
can u give me like a hiint of how to go about it?

Example Type of candle (we use MqlRates)

How to start with MQL5
How to start with MQL5
  • 2020.04.09
  • www.mql5.com
This thread discusses MQL5 code examples. There will be examples of how to get data from indicators, how to program advisors...