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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      70 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      152 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X