How do I change the color of candles based on an indicator value?

 
Hi there:

How do I change the color of candles based on an indicator/oscillator value that is in a separate window? I cannot find any documentation that allows me to access the color property of a particular price bar or candle. I want to change the color of the candle if, for example, my stochastic is in an overbought or oversold region. How do I make the color change and how do I access the stochastic values that are in a separate window to the chart that contains the bars/candles?

Thanks for your help.

Cheers,
Enforcer2006
 
See indicator Heiken Ashi
 
Rosh:
See indicator Heiken Ashi
Hi Rosh:

Thanks for that. I've got my candles changing. But I'm using the iStochastic function instead of the Stochastic that I already have on my screen.

1. How do I access my screen Stochastic and use the values off that indicator? Also
2. The width for my candles is hard coded to a value of 3. How do I obtain the actual width of the current candle?

Thanks again in advance.

Cheers,
Enforcer2006
 
1. No way.
2. No way.
 

Hello,


I'm also trying to accomplish something similar, changing the color of the main chart candles for a customized Bill Williams indicator.


Heiken Ashi was my first thought as well, but as I look at it, I'm not getting it, what do I need to do to change the colors, add additional buffers? Or is it simply a matter of a conditional somewhere?


If you could point me to a more precise answer or explain further I would appreciate it.


Thanks a bunch.


Tai

 

Hi TSheppard

The technique is to draw overlaping histograms so the part of the bigger histogram sticks up above the lesser one and that is all you can see. If you place the mouse anywhere below a candle it will say there is a Heiken Ashi indicator there but you can't see it. Take a look at the Sadukey indicator there is only two buffers involved making it easier to grasp.

Files:
Reason: