For this you would need to have programmed a template which has the TIF you wanted, there is not a supported method to manage the targets of the ATM directly.
One possible solution would be to manage this before submitting the order using a variable or logic. This would require creating two templates but then it could dynamically change between them:
entryOrder = account.CreateOrder(Cbi.Instrument.GetInstrument("AAPL"), OrderAction.Buy, OrderType.Market, TimeInForce.Day, 1, 0, 0, string.Empty, "Entry", null); string templateName = "NormalTemplateName"; if (entryOrder.TimeInForce == TimeInForce.Day) { templateName = "NormalTemplateName[B]_Day[/B]"; } NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrategy(templateName, entryOrder);
I look forward to being of further assistance.
Leave a comment: