Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Submitted orders can be cancelled by itself

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

    Submitted orders can be cancelled by itself

    I am using the following code to submit orders in onBarUpdate():
    myOrderPrice = GetCurrentBid() - 0.10;
    myEntryOrder = EnterLongLimit(myOrderPrice);


    then quickly without calling CancelOrder(), the order is called by itself from checking the orderState inside of OnOrderUpdate():
    the OnOrderUpdate() is called several times, its OrderState is changing from
    submitted -> accepted -> working -> CancelPending -> CancelSubmitted -> cancelled

    Any possible reasons this order can be cancelled by itself?

    Thanks.


    #2
    I know the answer now, need to set isLiveUntilCancelled

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Lumbeezl, Today, 01:20 AM
    0 responses
    3 views
    0 likes
    Last Post Lumbeezl  
    Started by fawzanalim, Yesterday, 05:59 PM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by JuanPabloQuevedo, Yesterday, 05:27 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by StevenNelson, Yesterday, 03:24 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by my-trade, Yesterday, 10:45 AM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Jason  
    Working...
    X