Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TIF on target and stop orders when using StartAtmStrategy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_Jesse
    replied
    Hello martyn73,

    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:

    Code:
    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_Day";
    }
    NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrategy(templateName, entryOrder);

    I look forward to being of further assistance.

    Leave a comment:


  • TIF on target and stop orders when using StartAtmStrategy


    Using the StartAtmStrategy() - https://ninjatrader.com/support/help...tmstrategy.htm

    I want to be able to use the specified TIF of the entry order for the Atm Strategy target and stop orders, potentially overriding what's specified in the Atm Strategy template. For example this can be done in Chart Trader, if you specify a different TIF value on the entry order, the target and stop orders will also use that TIF value. How can this be done? Thanks.


Latest Posts

Collapse

Topics Statistics Last Post
Started by s.kinra, Today, 12:52 AM
0 responses
2 views
0 likes
Last Post s.kinra
by s.kinra
 
Started by vivek.n, Yesterday, 03:19 AM
2 responses
33 views
0 likes
Last Post NinjaTrader_ShawnB  
Started by Angus7, Yesterday, 02:03 PM
1 response
13 views
0 likes
Last Post NinjaTrader_ShawnB  
Started by powerlobster, Yesterday, 01:39 PM
0 responses
17 views
0 likes
Last Post powerlobster  
Started by butt_toast, Yesterday, 01:16 PM
0 responses
12 views
0 likes
Last Post butt_toast  
Working...
X