I am attempting to use a List<T> within my code and expose the list as a Public Variable.
I can't seem to add the Reference to System.Collections.Generic to my Indicator. I go to right click->References->Add but I don't know where to find System.Collections.Generic.dll.
Can the System.Collections.Generic Namespace be added to Indicators and Strategies?
I am attempting something like
#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using System.Collections.Generic;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;
#endregion
public class myIndi : Indicator
private List<double> m_GreenWaveHighs = null ;
protected override void Initialize()
{
// Create List
m_GreenWaveHighs = new List<double>();
}
protected override void OnBarUpdate()
{
m_GreenWaveHighs.Add(m_CurrWaveHigh) ;
}
#region Properties
[Browsable(false)]
[XmlIgnore()]
public List<double> M_GreenWaveHighs
{
get { Update(); return m_GreenWaveHighs; }
}
#endregion

Comment