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 NullPointStrategies, Today, 05:17 AM
      0 responses
      24 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      120 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      63 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      45 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X