Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order Cancels itself immediately

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

    Order Cancels itself immediately

    Hi support,

    I have an automated system coded (single instrument/timeframe). I am experiencing a technical problem in which my order cancels itself immediately after placing. This occurs randomly and therefore I am unable to reproduce the trace here now.

    I have already set my liveuntilcanceled to true:

    long_entry_order=EnterLongLimit(0,true,qty_1_first _target, entry_price, "long_signal");

    SetStopLoss("long_signal", CalculationMode.Ticks, ticks_stoploss, false);


    90% of the times it works perfectly but occassionally, it cancels my order immediately after it has been placed.

    In order to rectify the problem, I have tried to resubmit the order when a cancelled order is detected:

    protected override void OnOrderUpdate(IOrder order)
    if(order.Name=="long_signal" && order.OrderState==OrderState.Cancelled )
    {

    long_entry_order=EnterLongLimit(0,true,qty_1_first _target, entry_price, "long_signal");

    SetStopLoss("long_signal", CalculationMode.Ticks, ticks_stoploss, false);

    }

    The above doesnt work in live trading. The order wont re-submit. I tested the above in simulation mode by manually cancelling the order in superdom. It works fine under this situation, the order got resubmitted. However, it simply doesnt resubmit when the order was cancelled automatically and unexpectedly (as opposed to manual cancel in superdom).

    I have searched the entire forum but couldnt find the solution. My major difficulty is that this error seems to be random, i dont know when it will happen.

    I am living in GMT+8 timezone, my system trade for me while i am asleep so this error is critical to my trading.

    Your help is much appreciated! Thank you.
    Last edited by puppeye; 03-26-2009, 11:41 PM.

    #2
    Hi puppeye, please test this again with TraceOrders = true in the Initialize of your strategy - http://www.ninjatrader-support.com/H...aceOrders.html

    Then check the output for any insight why the orders get cancelled.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    104 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    52 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    34 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    38 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    74 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X