NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrate gy("MyStrategy", buyOrd);
My problem is I want to create "MyStrategy" on the fly in the addon code, instead of creating it manually on DOM in advance by mouse and keyboard, just like this:
myStrategy.AddTarget();
myStrategy.SetProfitTarget(xxx);
myStrategy.SetStopLoss(xxx);
myStrategy.SetTrailStop(xxx);
// some code to add myStrategy to NT8 ATM Strategy Selection Control
account.Strategies.Add(myStrategy);
...
Order buyOrd = account.CreateOrder(Instrument, OrderAction.Buy, OrderType.Market, TimeInForce.Day, 1, 0, 0, "myOCO", "Entry", null);
NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrate gy(myStrategy, buyOrd);
Another question is about CreateOrder(),
Comment