How to change color?

 

This time I need to change the bar color in my chart window by the changing value in a custom indicator (MACD & SMA).

How to do that ? can anyone help me in this respect ??

I'm implementing some code as strategy, so i need it !!!

Thanx in advance for getting help from u guys. A simple example will do it for me....

 

You have to draw your own bars and color them, either using ObjectCreate() or Indicator Index pairs as histograms.

Basically draw over the existing chart.

The Heiken Ashi indicator uses the second method.

Reason: