Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancelling Orders - BUG ???

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

    Cancelling Orders - BUG ???

    Hi

    I have seen a fair few threads with issues/bugs around cancelling orders. I have a strategy, within the strategy I maintain a list of orders - I add to it when a limit order is placed and remove from it when it is filled - so it is a list of open orders. Yestersday I made a call to my function that loops through my list of orders in order to cancel them all - in doing so it cancelled the entire position and the unfilled orders! ... Is that something anybody has run across before ... I hope it is a bug in my code but how can a call to CancelOrder actually close a position - if a call to CancelOrder is made with an IOrder that has been filled does it close the position???

    Many Thanks

    Paul

    #2
    Paul, CancelOrder does not close a position, we would recommend you work with TraceOrders = true in the Initialize and check which part of code closes the position to debug this.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    567 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    548 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    548 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X