Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

order dont get submitted

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

    order dont get submitted

    protected override void OnBarUpdate()
    {

    IOrder orderBuy=null;
    IOrder orderSell= null;

    orderBuy = EnterLongStopLimit(Qty, 1, 1, "buy s1");
    orderSell = EnterShortStopLimit(Qty, 1, 1, "sell s1");

    }

    the orderSell will not be submitted.
    Last edited by mike4398; 03-05-2008, 05:54 AM.

    #2
    That is correct. You can not have 2 entry order at both sides of the market at the same time.

    Comment


      #3
      it doesn't give me any error messages, I have tried to use the limit orders instead and get incorrect results also.

      How do I realize this:

      if the price goes up (to price1) I want long position triggered,
      if down (to price2) then enter a short position.

      the best way to achieve this is to place two orders in opposite directions since we dont know where the price is going to (the next bar)

      this is a standard situation and supported by most of the software and you say I cannot do that in NT? (!)

      If you go to Elitetrader, software section, all the software that I know does that. I feel the customers should be aware about this limitation.
      I looked up the help file and it doesn't say anything about this.

      When it should generate the error I guess instead of the weird results like execution outside high-low range I get yesterday.
      Last edited by mike4398; 03-05-2008, 05:50 AM.

      Comment


        #4
        FYI, this is a second limitation of NT which I encountered while doing a simple test strategy, the first was that you cannot have multiple orders at the SAME direction and targetprofits working correctly!!!

        Do the multiple orders at the same direction "throw off internal logic of a strategy" as well?

        So for example if you have SetprofitTarget 100 ticks and more than one order at the same direction the results will be incorrect.

        It doesnt give you error messages as well and it takes lots of time to figure out what the NT gives you completely wrong results.

        I think the order handling engine needs some serious development.

        Comment


          #5
          You will see how NT internal order logic works as you turn TraceOrders on: http://www.ninjatrader-support.com/H...aceOrders.html

          You always should should test your strategy to understand how the logic works. TraceOrders help you understanding the order details.

          Comment


            #6
            Originally posted by NinjaTrader_Dierk View Post
            You will see how NT internal order logic works as you turn TraceOrders on: http://www.ninjatrader-support.com/HelpGuideV6/TraceOrders.html

            You always should should test your strategy to understand how the logic works. TraceOrders help you understanding the order details.
            Thats that I 've been doing, however you can spot only some discrepancies like negative profit with ProfitTarget exit.

            If the NT does not allow to have opposite orders, why would it take them without errors? The same for profit targets, any profit target exit with negative profit should generate at least some alert.

            It would be nice to have the alert (or assertion) when the code works not as expected because of "it's internal logic".

            If the program in computer have error it terminates, the strategy should do the same, just my opinion.

            I would prefer the strategy terminate itself other than running with errors.
            Last edited by mike4398; 03-05-2008, 09:20 AM.

            Comment


              #7
              Thanks for your suggestion. We'll add it to the list of future considerations.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              650 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              370 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              109 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              574 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              577 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X