Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by morrnel, 05-12-2024, 06:07 PM
    3 responses
    35 views
    0 likes
    Last Post wzgy0920  
    Started by FishTrade, Yesterday, 11:11 PM
    0 responses
    6 views
    0 likes
    Last Post FishTrade  
    Started by Austiner87, Yesterday, 03:42 PM
    1 response
    21 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by cshox, Yesterday, 11:11 AM
    2 responses
    16 views
    0 likes
    Last Post cshox
    by cshox
     
    Started by algospoke, Yesterday, 06:53 PM
    0 responses
    11 views
    0 likes
    Last Post algospoke  
    Working...
    X