So what I do is declare enums public in the indicator, so each indicator has its own enum, and no problem with versioning.
In the properties, you have to prefix the type with NinjaTrader.Indicator.IndyName
Example :
public class TestEnum : Indicator { public enum Enum {One, Two, Three}; private Enum myInput0 = Enum.One; protected override void Initialize() { Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0")); } protected override void OnBarUpdate() { Plot0.Set(Close[0]); } [Browsable(false)] [XmlIgnore()] public DataSeries Plot0 { get { return Values[0]; } } [GridCategory("Parameters")] public NinjaTrader.Indicator.TestEnum.Enum MyInput0 { get { return myInput0; } set { myInput0 = value; } } }
If strategy is unlocked, and '+' replaced with '.', compilation goes OK, but it's not possible to ask end users to do that.
Any idea ?
Comment