I need the background removed from the CoronaSwingPsn indicator. Not being a programmer I've made simple edits before but this one has me stumped. Is there a section of the NT7 code below that simply needs removed? Thank you very much to any knowledgeable programmer!!!
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;
namespace NinjaTrader.Indicator
{
/// <summary>
/// John Ehlers Corona Indicators
/// ported to NT by sefstrat
/// </summary>
[Description("Corona Swing Position")]
[Gui.Design.DisplayName(" Corona SwingPosition")]
public class CoronaSwingPsn : Indicator
{
#region Variables
private DataSeries _domCyc;
private DataSeries _domCycMdn;
private DataSeries _smoothHP;
private DataSeries _highPass;
private DataSeries _bandPass;
ArrayList leadList = new ArrayList(51);
ArrayList posList = new ArrayList(21);
private FilterBank[] bank
{
get { return _filters[CurrentBar]; }
}
#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()
{
#region Colors
_colors= new Color[21];
for (int n = 0; n <= 10; n++)
{
int c1 = 180 - (18 * n);
int c2 = 255 - (8 * n);
int c3 = 210 - (15 * n);
_colors[n] = Color.FromArgb(c1, c2, c3);
}
for (int n = 11; n <= 20; n++)
{
int c2 = (int)(172 * (2 - n / 10d));
int c3 = (int)(64 * (2 - n / 10d));
_colors[n] = Color.FromArgb(0, c2, c3);
}
#endregion
#region DataSeries
_domCyc = new DataSeries(this);
_highPass = new DataSeries(this);
_smoothHP = new DataSeries(this);
_domCycMdn = new DataSeries(this);
_bandPass = new DataSeries(this);
#endregion
// Keep cntMax fifo samples and find the Highest and Lowest lead for samples in the list
private void PhaseList(ref ArrayList list, int cntMax, double lead, out double H, out double L)
{
H = lead; L = lead;
if (list.Count < cntMax)
list.Add(lead);
else
{
list.RemoveAt(0);
list.Add(lead);
}
for (int n = 0; n < list.Count - 1; n++)
{
double val = (double)list[n];
if (val > H) H = val;
if (val < L) L = val;
}
}
public override void GetMinMaxValues(ChartControl chartControl, ref double min, ref double max)
{
min = -5;
max = 5;
return;
}
[Browsable(false)]
[XmlIgnore()]
public DataSeries SwingPsn
{
get { return Values[0]; }
}
#endregion
public const double twoPi = 2 * Math.PI;
public const double fourPi = 4 * Math.PI;
protected class FilterBank : ICloneable
{ // current, old, older
internal double[] I = new double[3];
internal double[] Q = new double [3];
internal double[] R = new double [3];
internal double[] Im = new double[3];
internal double Amplitude = 0;
internal double[] dB = new double[2];
internal double[] Raster = new double[2];
public object Clone()
{
FilterBank clone = new FilterBank();
return clone;
}
}
}
}
#region NinjaScript generated code. Neither change nor remove.
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
public partial class Indicator : IndicatorBase
{
private CoronaSwingPsn[] cacheCoronaSwingPsn = null;
private static CoronaSwingPsn checkCoronaSwingPsn = new CoronaSwingPsn();
/// <summary>
/// Corona Swing Position
/// </summary>
/// <returns></returns>
public CoronaSwingPsn CoronaSwingPsn()
{
return CoronaSwingPsn(Input);
}
/// <summary>
/// Corona Swing Position
/// </summary>
/// <returns></returns>
public CoronaSwingPsn CoronaSwingPsn(Data.IDataSeries input)
{
if (cacheCoronaSwingPsn != null)
for (int idx = 0; idx < cacheCoronaSwingPsn.Length; idx++)
if (cacheCoronaSwingPsn[idx].EqualsInput(input))
return cacheCoronaSwingPsn[idx];
lock (checkCoronaSwingPsn)
{
if (cacheCoronaSwingPsn != null)
for (int idx = 0; idx < cacheCoronaSwingPsn.Length; idx++)
if (cacheCoronaSwingPsn[idx].EqualsInput(input))
return cacheCoronaSwingPsn[idx];
// This namespace holds all market analyzer column definitions and is required. Do not change it.
namespace NinjaTrader.MarketAnalyzer
{
public partial class Column : ColumnBase
{
/// <summary>
/// Corona Swing Position
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.CoronaSwingPsn CoronaSwingPsn()
{
return _indicator.CoronaSwingPsn(Input);
}
/// <summary>
/// Corona Swing Position
/// </summary>
/// <returns></returns>
public Indicator.CoronaSwingPsn CoronaSwingPsn(Data.IDataSeries input)
{
return _indicator.CoronaSwingPsn(input);
}
}
}
// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
public partial class Strategy : StrategyBase
{
/// <summary>
/// Corona Swing Position
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.CoronaSwingPsn CoronaSwingPsn()
{
return _indicator.CoronaSwingPsn(Input);
}
/// <summary>
/// Corona Swing Position
/// </summary>
/// <returns></returns>
public Indicator.CoronaSwingPsn CoronaSwingPsn(Data.IDataSeries input)
{
if (InInitialize && input == null)
throw new ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method");