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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by habeebft, Today, 07:27 AM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_ChristopherS  
    Started by AveryFlynn, Today, 04:57 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by Max238, Today, 01:28 AM
    4 responses
    37 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by r68cervera, Today, 05:29 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by geddyisodin, Today, 05:20 AM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X