Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why won't Exits work?

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

    Why won't Exits work?

    Hello there,

    I'm finding that ExitLong() and ExitShort() don't work. However, before going realtime, the print statements show the exits were executed.

    What would cause this?

    They were both entered using EnterLong( "EnterLongMarket" ) and EnterShort( "EnterShortMarket" );

    Many Thanks, Caesar.
    Last edited by Skechers; 10-19-2023, 02:01 PM.

    #2
    Hello Caesar,

    Thank you for your post.

    Do you see any errors in the Log tab of the Control Center that could be related? If you enable Trace Orders in your strategy, does the output show anything about orders being ignored or rejected? Are you calling only ExitLong() and/or ExitShort(), or do you use signal names and fromEntrySignal values as well?

    I look forward to your reply.

    Comment


      #3
      Hi Emily,

      It turns out I had called CancelOrders immediately after calling ExitLong or Short. The effect was the Exit order was cancelled before even going to the broker (I think). I've separated the two calls in different event methods, it works now.

      Many Thanks, Caesar.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      21 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      30 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Working...
      X