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.
    BertrandNinjaTrader Customer Service

    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
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bmartz, 03-12-2024, 06:12 AM
        5 responses
        32 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by Aviram Y, Today, 05:29 AM
        4 responses
        12 views
        0 likes
        Last Post Aviram Y  
        Started by algospoke, 04-17-2024, 06:40 PM
        3 responses
        28 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by gentlebenthebear, Today, 01:30 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by cls71, Today, 04:45 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X