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

Limit order cancelled immediately

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

    Limit order cancelled immediately

    Hello,

    I'm experiencing the problem that limit orders generated by a strategy will get cancelled after 1-2 seconds about 75% of the time.

    The order is generated using this overload of EnterLongLimit:


    EnterLongLimit(0, false, (int)(Lots * LotMultiplier()), LimitPrice, StrategyName);


    This is the log output:


    7/10/2009 12:51:02 PM Order Order='19ue72s:1ihj/33110514' Name='EmaTrendBounce' New State=Cancelled Instrument='$EURAUD' Action=Buy Limit price=1.79083 Stop price=0 Quantity=0.1M Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''

    7/10/2009 12:51:02 PM Order Order='19ue72s:1ihj/33110514' Name='EmaTrendBounce' New State=Working Instrument='$EURAUD' Action=Buy Limit price=1.79083 Stop price=0 Quantity=0.1M Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''

    7/10/2009 12:51:02 PM Order Order='19ue72s:1ihj/33110514' Name='EmaTrendBounce' New State=Accepted Instrument='$EURAUD' Action=Buy Limit price=1.79083 Stop price=0 Quantity=0.1M Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''

    7/10/2009 12:51:02 PM Order Order='19ue72s:1ihj/33110514' Name='EmaTrendBounce' New State=PendingCancel Instrument='$EURAUD' Action=Buy Limit price=1.79083 Stop price=0 Quantity=0.1M Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''

    7/10/2009 12:51:02 PM Order Order='19ue72s:1ihj/33110514' Name='EmaTrendBounce' New State=Accepted Instrument='$EURAUD' Action=Buy Limit price=1.79083 Stop price=0 Quantity=0.1M Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''

    7/10/2009 12:51:01 PM Order Order='1e168631-DEMOYPOK-5/33110514' Name='EmaTrendBounce' New State=PendingSubmit Instrument='$EURAUD' Action=Buy Limit price=1.79083 Stop price=0 Quantity=0.1M Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''


    I'm fairly new to NinjaTrader, so I'm guessing I'm simply ignorant to some caveat of order handling. Thank you.

    #2
    Marc, the false you have set in the order entry specifies that the order is not live until cancelled.

    The default behavior (false for LiveUntilCancelled--how your entry order currently is) for entry limit orders is to cancel them if the conditions for entry are no longer true.

    You can try changing the false to true in your entry order and see if that solves the problem.

    Another useful debugging tool called TraceOrders is set in initialize: TraceOrders = true;.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Marc,

      This article may shed some more light onto the issue as well: http://www.ninjatrader-support.com/H...tml?Overview36

      Please see the "Order Submission for Entry and Exit Methods - Basic Operation" section.
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Austin and Josh, thank you for the clarification.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Christopher_R, Today, 12:29 AM
        0 responses
        6 views
        0 likes
        Last Post Christopher_R  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        166 responses
        2,234 views
        0 likes
        Last Post sidlercom80  
        Started by thread, Yesterday, 11:58 PM
        0 responses
        3 views
        0 likes
        Last Post thread
        by thread
         
        Started by jclose, Yesterday, 09:37 PM
        0 responses
        7 views
        0 likes
        Last Post jclose
        by jclose
         
        Started by WeyldFalcon, 08-07-2020, 06:13 AM
        10 responses
        1,414 views
        0 likes
        Last Post Traderontheroad  
        Working...
        X