I don't have all the details but from what I know, heres how its done.
1) When an indicator value is such that you want the candle color changed, you can paint over that candle using an indicator Histogram paint. You'll have 2 buffers, one is the high price, one is the low price. After you paint the histogram on the candle, the candle looks like its changed colors.
2) Look at the Heiken Ashi indicator in the MT5 terminal, they perform this operation with the indicator
Sorry i'm not more descriptive, hope its a good starting point
- votes: 10
- 2010.01.26
- MetaQuotes Software Corp. | English Russian Chinese Spanish Portuguese
- www.mql5.com
I would be interested in this too.
Hi,
I want to know how can be change the color of the candles based on some indicator. If it is possible how can we do it.
Any help appreciate.
Please read article "The Drawing Styles in MQL5".
PS
As examples you can use the following indicators:
iMovment - The indicator plots the candles with different colors depending on the trend direction and price movement.
Heiken-Ashi - The Heiken-Ashi indicator is looks like the candlestick chart, but it has some difference.
ColorBars - The ColorBars Indicator paints bars with different colors depending on the volume changes.
BW-ZoneTrade - The idea of this indicator has been proposed by Bill Williams in his book "New Trading Dimensions: How to Profit from Chaos in Stocks, Bonds and Commodities".
Please read article "The Drawing Styles in MQL5".
PS
As examples you can use the following indicators:
iMovment - The indicator plots the candles with different colors depending on the trend direction and price movement.
Heiken-Ashi - The Heiken-Ashi indicator is looks like the candlestick chart, but it has some difference.
ColorBars - The ColorBars Indicator paints bars with different colors depending on the volume changes.
BW-ZoneTrade - The idea of this indicator has been proposed by Bill Williams in his book "New Trading Dimensions: How to Profit from Chaos in Stocks, Bonds and Commodities".

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I want to know how can be change the color of the candles based on some indicator. If it is possible how can we do it.
Any help appreciate.