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 kinfxhk, 07-14-2026, 09:39 AM
      0 responses
      127 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      105 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      85 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      105 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      86 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X