my indicator :
namespace NinjaTrader.NinjaScript.Indicators { public class Xx { private bool signal= (espression); } public class Class2 : Indicator { public List<Xx> MT; private Xx useClass; } protected override void OnBarUpdate() { Xx tmp1 = new Xx(); MT.Add(tmp1); MT[MT.count-1].signal= //Logic espression }
In my strategy is correct to do this : (i want to enter signal by my Class2 Indicator)
public class StStrategy: Strategy { ..... protected override void OnStateChange() if (State == State.SetDefaults) { ............. { else if (State == State.Configure) { mt = Class2(); } protected override void OnBarUpdate() { if (mt.MT[mt.MT.Count-1].Xx) EnterLong(); .... .... }
if (mt.MT[mt.MT.Count-1].Xx)
i don't know if it's the same or not..help me..
thank
Comment