I'm using the following to color the region between Bollinger Bands:
DrawRegion("FLAT", CurrentBar, 0, Bollinger(2, 14).Upper, Bollinger(2, 14).Lower, Color.Empty, Color.Lime, 2);
That works fine. My question is how do I dynamicaly change the coloring when I wish to? I've simply tried doing this:
if(value == 1)
{
DrawRegion("FLAT", CurrentBar, 0, Bollinger(2, 14).Upper, Bollinger(2, 14).Lower, Color.Empty, Color.Lime, 2);
}
if(value == 2)
{
DrawRegion("FLAT", CurrentBar, 0, Bollinger(2, 14).Upper, Bollinger(2, 14).Lower, Color.Empty, Color.Empty, 2);
DrawRegion("DOWN", CurrentBar, 0, Bollinger(2, 14).Upper, Bollinger(2, 14).Lower, Color.Empty, Color.Red, 2);
}
if(value == 3)
{
DrawRegion("FLAT", CurrentBar, 0, Bollinger(2, 14).Upper, Bollinger(2, 14).Lower, Color.Empty, Color.Empty, 2);
DrawRegion("UP", CurrentBar, 0, Bollinger(2, 14).Upper, Bollinger(2, 14).Lower, Color.Empty, Color.Blue, 2);
}
But for some reason the color remains the original...why?
Comment