I'm trying to make a simple modified CCI indicator.
The function is to shade the area between CCI and level 100.
But the output seems it drift to the left.
Could anyone give me some advice?
Thanks for any help
The Drawing Part Code:
Plot0[0] = CCI(Period)[0];
top[0] = Plot0[0];
if(top[0] < -100)
{
Draw.Region(this, "Region" + CurrentBar,1, 0, top, -100, Brushes.Red, 70);
}
else if(top[0] > 100)
{
Draw.Region(this, "Region" + CurrentBar,1, 0, top, 100, Brushes.Green, 70);
}
Comment