Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CancelOrder() problem

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

    CancelOrder() problem

    When using the CancelOrder() method I'm finding that the order is not canceled immediately, but rather at the start of a new bar. Is it supposed to work like this?

    When I create an order through chart trader, and then close the order, it closes immediately. How can I achieve this level of response programatically?

    Thanks
    Peter

    Update: O.K. After many hours I've got this issue sorted, one must use this limit order method -

    EnterLongLimit(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double limitPrice, string signalName) and not the short version. It would be helpful if a note could be added to the help guide on this issue.
    Last edited by boreland; 12-27-2009, 04:56 PM.

    #2
    Hi boreland, correct you would need to use the extended overload in multiseries context to submit to the need bars object, but not sure I fully follow on what you expected from CancelOrder() - it would depend mostly if you run the strategy on each tick or not (CalculateOnBarClose setting).

    For the EnterLongLimit, the orders just expires at the end of each bar if not resubmitted or set to liveUntilCancelled.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    52 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    142 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    160 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    96 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X