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 condorhero, Today, 09:28 PM
    0 responses
    6 views
    0 likes
    Last Post condorhero  
    Started by MaraAnkh, Today, 08:44 PM
    0 responses
    8 views
    0 likes
    Last Post MaraAnkh  
    Started by wooofad, Today, 05:38 PM
    0 responses
    7 views
    0 likes
    Last Post wooofad
    by wooofad
     
    Started by caacapital, Today, 10:10 AM
    2 responses
    18 views
    0 likes
    Last Post caacapital  
    Started by DiverG20, Today, 10:23 AM
    0 responses
    25 views
    0 likes
    Last Post DiverG20  
    Working...
    X