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

 
jaffer wilson:

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.

I actually don't understand what you're asking, Like I said a small chart section is not enough to decide how the charting software determines the colour of O==C alternatively you just change the code to set O==C to green and if you can't figure that out yourself then I doubt anyway here will be able to help you

 
jaffer wilson:

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.

@jaffer wilson do you have the code that produces this result, i do not mean the > over <under and == equal to , but the actual code that rendered those candles in you screenshot.

This most likely happens when the dev uses the else in stead of the if else statement.

For example, if

if(close[1] < open[1])
{ 
 candle_color=clrRed;
}

else
{
 candle_color=clrGreen;
}

 In that case short candles are drawn red and all other ones green.

This also goes for when the >= greater or equal is used in that case it will also be green when close[1]==open[1].

So it's necessary to explicitly filter all 3 conditions.

if(close[1] < open[1])
{ 
 candle_color=clrRed;
}

if(close[1] > open[1])
{ 
 candle_color=clrGreen;
}

if(close[1] == open[1])
{ 
 candle_color=clrYellow;
}

 Then you should also realize that high[1] != low[1]

This means that the final == equal values came to be at the end, and that the last seen color could have been green, and the candle simply stayed green because the last few moves were up.

In that case the code probablt does not change the candle color to clrNone, or what is clrNone? tha candle would disappear .

 

To see the Dojis, make the line a different colour.