Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancelled order due to end of session handling

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

    Cancelled order due to end of session handling

    Hi NinjaTrader,

    My intraday strategy (period 30 minutes) exits a long potion by market order, ExitLong(), based on some criteria. Also it has a stop-loss order which may last several days.

    There is problem running it on TDAmeritrade because TDA does not allow market-sell order to have Gtc TimeInForce.

    Like, if I set Strategy TimeInForce to Gtc, ExitLong() will be rejected by TDA and startegy stopped; if I set Strategy TimeInForce to Day, it is incorrect to my Stop-Loss orders, which may last several days.

    I wonder what is the proper way of dealing this situation. Or the ExitLong() order method has a time-in-force attribute I failed to notice? Right now time-in-force seems can only be set at Strategy level.

    Thank you Ninja.

    #2
    Hello Tony345,

    Thanks for your post.

    If your connection is through TD Ameritrade, the strategy using Market orders must be set to Time In Force = DAY. Unfortunately, this must be set up on Strategy initialization, so there would be no way to exclusively set your exit orders to TIF = GTC at run time. The strategy would be able to use the GTC time in force if the entry order were not a Market type order.

    Please let me know if I can assist any further.​
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hi Brandon,

      I see. Thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      152 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      87 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      131 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      127 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      106 views
      0 likes
      Last Post CarlTrading  
      Working...
      X