Download MetaTrader 5

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

To add comments, please log in or register
Write articles and earn money. We pay 200 USD for them!
Jiten
30
Jiten 2010.05.22 10:48 

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.

Mihai Ionescu
1289
Mihai Ionescu 2010.08.21 17:32  
I would be interested in this too. 
Patrick
154
Patrick 2010.08.21 17:57  

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.
Vladimir Batrudinov
4924
Vladimir Batrudinov 2010.08.21 18:00  
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".

Mihai Ionescu
1289
Mihai Ionescu 2010.08.22 22:08  
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.
To add comments, please log in or register