I'm attempting to change the DrawRegion of my indicator according to the values of the WilliamsR. Unfortunately I'm missing something. I'm not getting any Opacity change. It stays green. Anyone know how to do this. Here is the code:
// Calculate Williams value
double value1 = WilliamsR(14)[0];
double value2 = WilliamsR(150)[0];
if (value2 > -50
&& value1 < -75)
{
DrawRegion("Region", CurrentBar, 0, Upper, Lower, Color.Empty, Color.Red, Opacity);
}
else
{
DrawRegion("Region", CurrentBar, 0, Upper, Lower, Color.Empty, Color.Green, Opacity);
}
Upper.Set(VMA(High, Length, Volatility)[0]);
Lower.Set(VMA(Low, Length, Volatility)[0]);
Comment