The following steps cause NT to hangOpen a chart
- Add the indicator to the chart
- Configure two symbols
- View the chart - Initialize Adds the two symbol; everything ok so far
- Open indicator parameters and remove one of the symbols (by setting the symbol field to "")
- Go back to chart => Ninja hands and chart does not display anymore.
Below is the simplest code I could make that reproduces this. It happens 100% of the time on my computer and on others computers as well.
--Onn
namespace NinjaTrader.Indicator { [Description("")] public class Tester : Indicator { private string symbol1 = ""; private int period1 = 15; private PeriodType type1 = PeriodType.Minute; private string symbol2 = ""; private int period2 = 15; private PeriodType type2 = PeriodType.Minute; protected override void Initialize() { if (symbol1 != "") { Add(symbol1, type1, period1); } if (symbol2 != "") { Add(symbol2, type2, period2); } } protected override void OnBarUpdate() { return; } #region Properties public string Symbol1 { get { return symbol1; } set { symbol1 = value; } } public int Period1 { get { return period1; } set { period1 = value; } } public PeriodType Type1 { get { return type1; } set { type1 = value; } } public string Symbol2 { get { return symbol2; } set { symbol2 = value; } } public int Period2 { get { return period2; } set { period2 = value; } } [Description("")] public PeriodType Type2 { get { return type2; } set { type2 = value; } } #endregion } }
Comment