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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    47 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    15 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    21 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X