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 Max238, Today, 01:28 AM
    1 response
    22 views
    0 likes
    Last Post CactusMan  
    Started by giulyko00, Yesterday, 12:03 PM
    2 responses
    10 views
    0 likes
    Last Post giulyko00  
    Started by r68cervera, Today, 05:29 AM
    0 responses
    4 views
    0 likes
    Last Post r68cervera  
    Started by geddyisodin, Today, 05:20 AM
    0 responses
    6 views
    0 likes
    Last Post geddyisodin  
    Started by JonesJoker, 04-22-2024, 12:23 PM
    6 responses
    38 views
    0 likes
    Last Post JonesJoker  
    Working...
    X