protected override void CalcBar()
 {
     m_ccivalue.Value = Bars.CCI(length);
     Plot1.Set(0, m_ccivalue.Value);
     Plot2.Set(0, overbought);
     Plot3.Set(0, oversold);
     if (PublicFunctions.DoubleGreater(m_ccivalue.Value, overbought))
     {
         Plot1.Colors[0] = overbcolor;
     }
     else
     {
         if (PublicFunctions.DoubleLess(m_ccivalue.Value, oversold))
         {
             Plot1.Colors[0] = overscolor;
         }
     }
     if (this.CrossesOver(m_ccivalue, oversold))
     {
         Alerts.Alert("Indicator exiting oversold zone");
     }
     else
     {
         if (this.CrossesUnder(m_ccivalue, overbought))
         {
             Alerts.Alert("Indicator exiting overbought zone");
         }
     }
 }
 protected override void CalcBar()
 {
     m_ccivalue.Value = Bars.CCI(ccilength);
     m_cciavg.Value   = m_ccivalue.Average(cciavglength);
     Plot1.Set(0, m_ccivalue.Value);
     Plot2.Set(0, m_cciavg.Value);
     Plot3.Set(0, overbought);
     Plot4.Set(0, oversold);
     if (this.CrossesOver(m_cciavg, oversold))
     {
         Alerts.Alert("Indicator exiting oversold zone");
     }
     else
     {
         if (this.CrossesUnder(m_cciavg, overbought))
         {
             Alerts.Alert("Indicator exiting overbought zone");
         }
     }
 }