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 algospoke, Yesterday, 06:40 PM
        2 responses
        24 views
        0 likes
        Last Post algospoke  
        Started by ghoul, Today, 06:02 PM
        3 responses
        15 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        46 views
        0 likes
        Last Post jeronymite  
        Started by Barry Milan, Yesterday, 10:35 PM
        7 responses
        23 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by AttiM, 02-14-2024, 05:20 PM
        10 responses
        181 views
        0 likes
        Last Post jeronymite  
        Working...
        X