Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using EnterShortStop() and EnterShortLimit() simultaneously

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

    Using EnterShortStop() and EnterShortLimit() simultaneously

    I have the following:

    EnterShortStop(1, LTarget, "ShortL");
    EnterShortLimit(1, PTarget, "ShortP");

    Price is first going up so I expect the EnterShortLimit to be hit first. However, it is not executed. Some time later the EnterShortStop IS executed however.

    Is there a problem having these two simultaneously?

    EDIT:
    I see now that only the first one is executed. If I swap them, i.e.

    EnterShortLimit(1, PTarget, "ShortP");
    EnterShortStop(1, LTarget, "ShortL");

    then only the EnterShortLimit is executed. So apparently one order cancels the other?
    But I don't understand why that should be.... ?
    Last edited by FireFly; 09-07-2010, 05:23 AM.

    #2
    FireFly, you are likely running into the Internal Order Handling Rules with this -

    http://www.ninjatrader-support.com/H...verview36.html (bottom section of this link)

    Please check with TraceOrders for the underlying reason of the ignored order -

    Comment


      #3
      I have checked the Internal Order Handling Rules but I still don't see why they would ignore the second order.

      Comment


        #4
        Please run your code with the TraceOrders enabled, it would state the reason for ignoring the order in your output window then.

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          Please run your code with the TraceOrders enabled, it would state the reason for ignoring the order in your output window then.
          I did that already:

          "An Enter() method to submit an entry order has been ignore. Please search on the term 'Internal Order Handling Rules" in the Help Guide for detailed explanation"

          Well, as I said I have checked the Internal Order Handling Rules and I don't see why the order is ignored.

          Comment


            #6
            FireFly,

            Which version of NT are you running? NT6.5 does not allow what you're trying to do.

            However, NT7 does if you set Unmanaged = true in your initialize code. You will have to code for this, so you may want to look over the help file and search unmanaged.
            mrlogik
            NinjaTrader Ecosystem Vendor - Purelogik Trading

            Comment


              #7
              Originally posted by FireFly View Post
              I did that already:

              "An Enter() method to submit an entry order has been ignore. Please search on the term 'Internal Order Handling Rules" in the Help Guide for detailed explanation"

              Well, as I said I have checked the Internal Order Handling Rules and I don't see why the order is ignored.
              What other Set or Exit methods are you using in your code?

              Comment


                #8
                Originally posted by mrlogik View Post
                FireFly,

                Which version of NT are you running? NT6.5 does not allow what you're trying to do.

                However, NT7 does if you set Unmanaged = true in your initialize code. You will have to code for this, so you may want to look over the help file and search unmanaged.
                I'm running NT6.5.

                Thanks for your suggestion! However, I first would like to understand why the current setup doesn't work. I don't see why it goes against order handling rules.

                Comment


                  #9
                  Originally posted by NinjaTrader_Bertrand View Post
                  What other Set or Exit methods are you using in your code?
                  I use:

                  EnterLong(1,"Long");

                  only once to enter a long position in one specific bar. After that I intend to reverse and short on

                  EnterShortStop(1, LTarget, "ShortL");
                  EnterShortLimit(1, PTarget, "ShortP");

                  I was expecting in this case that the position would reverse and go short on the EnterShortLimit (because price goes up first) and that a number of bars later an extra short would be entered with the EnterShortLimit.
                  (EntriesPerDirection>1, this is not the limitation)

                  Comment


                    #10
                    Any ideas why this doesn't work?

                    Comment


                      #11
                      Can you please attach the TraceOrders output you would get in this scenario?

                      Thanks

                      Comment


                        #12
                        Originally posted by NinjaTrader_Bertrand View Post
                        Can you please attach the TraceOrders output you would get in this scenario?

                        Thanks

                        2/14/2000 12:00:00 AM Entered internal PlaceOrder() method at 2/14/2000 12:00:00 AM: Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='Long' FromEntrySignal=''
                        2/15/2000 12:00:00 AM Entered internal PlaceOrder() method at 2/15/2000 12:00:00 AM: Action=SellShort OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=634.72 SignalName='ShortL' FromEntrySignal=''
                        2/15/2000 12:00:00 AM Entered internal PlaceOrder() method at 2/15/2000 12:00:00 AM: Action=SellShort OrderType=Limit Quantity=1 LimitPrice=674.72 StopPrice=0 SignalName='ShortP' FromEntrySignal=''
                        2/15/2000 12:00:00 AM Ignored PlaceOrder() method at 2/15/2000 12:00:00 AM: Action=SellShort OrderType=Limit Quantity=1 LimitPrice=674.72 StopPrice=0 SignalName=ShortP' FromEntrySignal='' Reason='An Enter() method to submit an entry order has been ignore. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation.'

                        Comment


                          #13
                          Any ideas?

                          Comment


                            #14
                            Unfortunately not FireFly, if no Exits or Sets are working in the mix...can you please send us the strategy / market / chart setting to test it here? You can direct it to support at ninjatrader dot com - thanks

                            Comment


                              #15
                              Originally posted by NinjaTrader_Bertrand View Post
                              Unfortunately not FireFly, if no Exits or Sets are working in the mix...can you please send us the strategy / market / chart setting to test it here? You can direct it to support at ninjatrader dot com - thanks
                              I have just mailed a stripped version of the strategy that shows the problem.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              558 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              324 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              101 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              545 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              547 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X