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 Segwin, 05-07-2018, 02:15 PM
        14 responses
        1,789 views
        0 likes
        Last Post aligator  
        Started by Jimmyk, 01-26-2018, 05:19 AM
        6 responses
        837 views
        0 likes
        Last Post emuns
        by emuns
         
        Started by jxs_xrj, 01-12-2020, 09:49 AM
        6 responses
        3,293 views
        1 like
        Last Post jgualdronc  
        Started by Touch-Ups, Today, 10:36 AM
        0 responses
        13 views
        0 likes
        Last Post Touch-Ups  
        Started by geddyisodin, 04-25-2024, 05:20 AM
        11 responses
        63 views
        0 likes
        Last Post halgo_boulder  
        Working...
        X