#region Variables
// Wizard generated variables
// User defined variables (add any user defined variables below)
#endregion
/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Line(Color.DarkGray, 180, "Level 1"));
Add(new Line(Color.DarkGray, 0, "Zero line"));
Add(new Line(Color.DarkGray, -180, "Level -1"));
Add(new Plot(Color.Green, PlotStyle.Bar, "UpCCI"));
Add(new Plot(Color.Red, PlotStyle.Bar, "DnCCI"));
Add(new Plot(Color.Brown, PlotStyle.Bar, "UnchCCI"));
CalculateOnBarClose = false;
Overlay = false;
PriceTypeSupported = false;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
if (Close[0] > Open[0]) UpCCI.Set(CCI(45)[0]);
if (Close[0] < Open[0]) DnCCI.Set(CCI(45)[0]);
if (Close[0] == Open[0]) UnchCCI.Set(CCI(45)[0]);
}

Comment