How to know what is the color of the candle on chart with open == close?

To add comments, please log in or register
jaffer wilson
769
jaffer wilson  

Hello everyone,

 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:  

candles doji

As I am collecting the candles data with their respective color using the following code: 

if(open[0] > close[0])
colorcandle = "Red"
if(open[0] < close[0])
colorcandle = "Green"
if(open[0] == close[0])
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.

Samuel Akinbowale
2774
Samuel Akinbowale  

[0]  or [i] ?

kypa
981
kypa  
It has the Line Color or some of the Bull/Bear Bar colors I think.
Minions Labs
1174
Minions Labs  
jaffer wilson:

Hello everyone,

 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: 

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.

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.

Sergey Golubev
Moderator
106120
Sergey Golubev  

It is doji (I am using this indicator) - 

doji

doji

Marco vd Heijden
Moderator
8167
Marco vd Heijden  
it can also be based on the previous candle..
Qoyyuum Kadir
121
Qoyyuum Kadir  
jaffer wilson:

Hello everyone,

 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: 

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.

"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.

jaffer wilson
769
jaffer wilson  

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.

iRick
181
iRick  
jaffer wilson:

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

jaffer wilson
769
jaffer wilson  
Sergey Golubev:

It is doji (I am using this indicator) - 



Yeah, I wanted to know the color of such candles. Can you help me with that?

jaffer wilson
769
jaffer wilson  
iRick:

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

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.

12
To add comments, please log in or register