I'm trying to draw a region whose color will depend on whether an indicator line is higher or lower than another indicator line.
It just keeps giving me the same color, though.
Could you please tell me what is incorrect with this syntax? I've simplified the issue with the following sample.
I would be most grateful for your help.
SAMPLE:
// If the close of the bar is higher than the open of the bar, the region should be painted blue. If the other way around, painted yellow.
if (Close[0] > Open[0])
{
Draw.Region(this, "BULL", CurrentBar, 0, Close, Open, Brushes.Transparent, Brushes.Blue, 50);
}
else if (Close[0] < Open[0])
{
Draw.Region(this, "BEAR", CurrentBar, 0, Close, Open, Brushes.Transparent, Brushes.Yellow, 50);
}

Comment