Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to enter long/short limit order at the same time

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

    how to enter long/short limit order at the same time

    Let's say I want to enter a long limit order at $30 and a short limit order at $50 at the same time:

    shortOrder = EnterShortLimit(
    0, true, 100, 50, "short");
    longOrder = EnterLongLimit(0, true, 100, 30, "long");

    When I run the back test, the first order stays at "working" state, and the second order never shows up.

    How to enter both long/short limit order at the same time?

    Thanks.

    #2
    trya123, welcome to our forums! With this setup you'll run into the 'Internal Order Handling Rules' - http://www.ninjatrader-support.com/H...verview36.html (bottom section of the link)

    If you enable TraceOrders = true in the Initialize() of your strategy and open the output window in the Control Center, this is much easier to debug / recognize -



    NinjaTrader 7 will offer a new unmanaged order submission feature giving your more flexibility in this regard -

    Last edited by NinjaTrader_Bertrand; 08-13-2009, 03:32 AM.

    Comment


      #3
      Enter by Limit order

      When you specify in Ninja Trader Strategy
      if (EMA18 crossavobe EMA90),
      Enter Long by Limit order @ price 100.


      Does this mean that when the above conitions have been meet the strategy will place a limit order @100 until its filled
      or
      will it cancel the order if the above conditions are not ture anymore?

      Comment


        #4
        bologc, per default limit orders expire at the end of the bar if not resubmitted, in your case they would expire cause the condition would not evaluate to 'true' again on the next bar. For a reference sample dealing with those topics, please check this link - http://www.ninjatrader-support2.com/...ad.php?t=19169

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        144 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        70 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        78 views
        0 likes
        Last Post PaulMohn  
        Working...
        X