Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reversing Positions

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

    Reversing Positions

    When running my strategies with TraceOrders=true I get the following in my logs.

    2/11/2009 1:47:00 PM Ignored PlaceOrder() method at 2/11/2009 1:47:00 PM: Action=SellShort OrderType=Limit Quantity=100 LimitPrice=21.89 StopPrice=0 SignalName=SE' 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.'
    I've reviewed the contents of the document at http://www.ninjatrader-support.com/H...verview36.html, however I do not see any scenario that applies to me.

    The order that is being ignored in my case is a reversal order from long to short. Below is the code I am using.

    Code:
    [FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]
    // check for long signal
    [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] (Close[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]] > myprice)
    {
     LE = EnterLongLimit([FONT=Courier New]myprice[/FONT], [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"LE"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]);
    }
    [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]// check for short signal[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
    [FONT=Courier New][SIZE=2][FONT=Courier New][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] (Close[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]] < myprice)
    {
     SE = EnterShortLimit([FONT=Courier New]myprice[/FONT], [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"SE"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]);
    }
    [/SIZE][/FONT][/SIZE][/FONT]

    #2
    What is likely happening is that your long limit order is actually still working. Submitting an EnterShortLimit() is not a reversal order in this case because you do not have a long position. Instead you should cancel your EnterLongLimit() first, confirm cancellation, then submit EnterShortLimit().
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      What is likely happening is that your long limit order is actually still working. Submitting an EnterShortLimit() is not a reversal order in this case because you do not have a long position. Instead you should cancel your EnterLongLimit() first, confirm cancellation, then submit EnterShortLimit().
      I actually do already have a long position when this order is sent and ignored.

      Comment


        #4
        In this case it could be a Set or Exit method active and getting you into the 'Internal Order Handling' when placing the order to reverse.

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          In this case it could be a Set or Exit method active and getting you into the 'Internal Order Handling' when placing the order to reverse.
          You are correct. It was due to my exit orders that were working. Thanks for your help!
          Last edited by SystemTrading; 02-19-2009, 10:39 AM.

          Comment


            #6
            Yes, please cancel those and send you reversal order then.

            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