Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Do I need unmanaged orders?

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

    Do I need unmanaged orders?

    Hi again guys. I want to create a strategy that is always long or short 1 unit.

    Strategy starts out flat. It then gets a signal and buys or sells 1 unit. Then it does nothing until it gets it's next signal, which would be a single buy or sell of 2 units. And it would keep doing this until the strategy was turned off.

    I have built the strategy using managed orders using EnterLong() and EnterShort(), however when it executes it submits two trades of 1 unit each. So if it starts flat, then enters a long at 1 unit, it will flip position using two trades - a sell of 1 unit to get to flat and then another sell of 1 unit to become short.

    While convenient code wise, practically this has a number of issues. Can a strategy be programmed as I described using managed orders?

    Or do I need to use unmanaged orders? I'm feeling that I probably do... so... is there an example or demo file detailing some of the intricacies of Unmanaged orders? Like how you handle partial fills or if the market moves away and canceling live orders and handling errors?

    Thanks much!

    #2
    Hello Locke,

    Thank you for writing in. You are correct in that to accomplish this you will need to use the unmanaged approach. Please see our help guide for additional information on using the unmanaged method: http://ninjatrader.com/support/helpG...tsub=unmanaged

    Some example strategies can be found on our forums: http://ninjatrader.com/support/forum...ead.php?t=3220

    If you have any issues, please feel free to post again and we will be happy to assist further.
    Michael M.NinjaTrader Quality Assurance

    Comment


      #3
      Thanks Michael. Yes I skimmed that list of examples but didn't see anything explicitly labeled as using Unmanaged orders, which is why I asked.

      I'll come back after I've broken a few test runs thanks, ha.

      Comment


        #4
        Wait, I don't understand ...

        This sounds like a perfect example of using managed orders.

        The EnterLong() automatically knows to exit a short position under the hood before actually placing the buy order, EnterShort() knows to do the opposite.

        You, the programmer, never need to issue an ExitLong() or ExitShort() -- these routines automatically flip the trade for you. This automatic exit-opposite-position-before-placing-the -order is what using the managed approach is all about.

        Isn't that what you want? Am I missing something?

        Comment


          #5
          Hello bltdavid,

          Thank you for writing in. If I understood the original problem correctly the issue was not that he could not reverse the position using the managed order handling method, it was that when using the managed order handling method it was reversed using two separate trades (one to bring the position flat and the other to enter in the other direction). In order to reverse without the program submitting two trades, the unmanaged order handling method would need to be used.

          Please let me know if I may be of further assistance.
          Michael M.NinjaTrader Quality Assurance

          Comment


            #6
            Yep that's correct. Two orders means twice the booking and accounting. Different prices, market moves, etc... Cleaner with one trade.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by alifarahani, 04-19-2024, 09:40 AM
            8 responses
            53 views
            0 likes
            Last Post alifarahani  
            Started by mmckinnm, Today, 01:34 PM
            2 responses
            5 views
            0 likes
            Last Post mmckinnm  
            Started by Conceptzx, 10-11-2022, 06:38 AM
            3 responses
            60 views
            0 likes
            Last Post NinjaTrader_SeanH  
            Started by f.saeidi, Today, 01:32 PM
            1 response
            2 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by traderqz, Today, 12:06 AM
            9 responses
            16 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Working...
            X