if( CurrentBar < 2 )return;
if (Calculate == Calculate.OnBarClose)
_intCalculationIndex = 1;
if (RSI2[0] > -30)
{
BreakOut = true;
BreakDn = false;
}
else if (RSI2[0] < 30)
{
BreakOut = false;
BreakDn = true;
}
if (IsFirstTickOfBar && BreakOut)
{
_intStartBar = CurrentBar;
}
if (IsFirstTickOfBar && BreakDn)
{
_intStartBar = CurrentBar;
}
if (this.BreakOut)
{
Draw.Region(this, "up"+ _intStartBar, CurrentBar - _intStartBar + 1, 0, RSI2, 30, null, Brushes.Red, 20);
}
else if (this.BreakDn)
{
Draw.Region(this, "down" + _intStartBar, CurrentBar - _intStartBar + 1, 0, RSI2, -30, null, Brushes.Green, 20);
}
Photo of what I'm trying to accomplish.:

Comment