Can we change the color of price candles based on an indicator?

 

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.

 
I would be interested in this too. 
 

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 

Heiken-Ashi
  • votes: 10
  • 2010.01.26
  • MetaQuotes Software Corp. | English Russian Chinese Spanish Portuguese
  • www.mql5.com
The Heiken-Ashi indicator is looks like the candlestick chart, but it has some difference.The advantage of the Heiken-Ashi charts is a simple trend determination, the upward trend candles are blue,the downward trend candles are red.
 
ifmihai:
I would be interested in this too. 
kjitender:

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

 
Interesting:

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

Thank you Interesting. Very helpful.
Reason: