I was trying to collect the data with MT5 and only the OHLC values of the candles with the their respective color. I am quite confused, when I see that my data say nothing about the candles as shown in the figure:
As I am collecting the candles data with their respective color using the following code:
if(open > close)
colorcandle = "Red"
if(open < close)
colorcandle = "Green"
if(open == close)
colorcandle = "Nocolor"
I clearly see that the candle shown in the figure are green but the collected data shown me that the candle has Nocolor
Kindly, let me know how I can decide the color of the candle as the logic is failing to detect such condition.
 or [i] ?
A candle with O == C has NO color. You are using the wrong color on the chart to coloring this situation.
Check for "Line Chart" on Colors.
It is doji (I am using this indicator) -
"NoColor" doesn't seem to be a valid value. Even then, it would default to whatever default color the terminal would already have. Try a different color like "Yellow" and see if that works.
Thank you all for your reply. But the is not the point which most of the people here are understanding. Let me clarify it.
I am using MQL5 programming language for detecting the color of the candle on the chart. I am collecting the OHLC values along which the chart color. I have planted the logic as I have previously mentioned that. But as shown in the figure the doji candle has O==C, that means my logic will yield Nocolor as the output instead of green or red. But as shown in the figure the doji has green color. so how I can get to know what color the doji is as my logic is failing to detect the color of the candle.
Thats what I mean. Please let me know if I am clear here.
You haven't really given enough information to go on
Everyone is correct in that the O==C should be no colour (you obviously know green means it closed higher than opening and red vice versa, so it's not hard to understand that open=close doesn't fall into this logic)
But it seems the chart you looking at assigns this a colour, going on your chart I'd say they're always green
Yeah, I wanted to know the color of such candles. Can you help me with that?
That's what I needed to identify using the code. can you help with that? As my logic is failing. Is there anything in the MQL that can help me? Please do let me know.