Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order problems

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

    Order problems

    Hi

    Have a strategy that places "working" orders at defined prices on the close of a bar when the conditions are met.

    The system starts the order process of submitted -> accepted but never gets to the working stage. (Previously it was going all the way through to "working" but had a cancel order problem.)

    Then on the very next bar it starts the process of cancelling the order, which it should not do until 4 bars later, based on certain conditions. I have commented out the cancel order method but to no avail.

    I am using the OnOrderUpdate method to manage my orders and using the following
    EnterShortStopLimit(Quantity, entryPrice * TickSize, "selllmt");
    EnterLongStopLimit(Quantity, entryPrice * TickSize, "buylmt");
    to place the orders. They appear as dots on the screen to confirm they are at the correct prices.

    So in essence why do they not become working orders and why do they get cancelled on the next bar?

    If any one can point me in the right direction that would be great.

    Thanks in advance

    #2
    Hello fishbed,

    If you have not submitted the order with liveUntilCancelled as true, and if you are not resubmitting the order when the bar closes, the order will be cancelled when the bar it was submitted on closes.

    EnterLongStopLimit(int barsInProgressIndex, bool isLiveUntilCancelled, int quantity, double limitPrice, double stopPrice, string signalName)
    http://ninjatrader.com/support/helpG...gstoplimit.htm

    For a second order to be submitted, this would depend on the settings for EntriesPerDirection and EntryHandling and whether unique signal names are used.

    If EntriesPerDirection is 1 and EntryHandling is AllEntries the second order will be ignored.
    If EntriesPerDirection is 2 the second order will be placed.
    If EntriesPerDirection is 1 and EntryHandling is UniqueEntries and the two orders have the same signal names the second order will be ignored.
    If EntriesPerDirection is 1 and EntryHandling is UniqueEntries and the two orders have different signal names the second order will be placed.

    EntriesPerDirection - http://ninjatrader.com/support/helpG...rdirection.htm
    EntryHandling - http://ninjatrader.com/support/helpG...ryhandling.htm
    Last edited by NinjaTrader_ChelseaB; 04-27-2017, 06:34 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by i2w8am9ii2, Today, 04:36 PM
    1 response
    2 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by WeyldFalcon, Today, 02:07 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ThomasC  
    Started by hfwiley, Today, 03:02 PM
    2 responses
    16 views
    0 likes
    Last Post hfwiley
    by hfwiley
     
    Started by pdennis, Today, 02:34 PM
    3 responses
    15 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by tonynt, Today, 01:47 PM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Kate  
    Working...
    X