Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Buying & Selling vs. Reversing Positions

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

    Buying & Selling vs. Reversing Positions

    Hello,

    On the one hand, I've witnessed behavior whereby a new short signal will both close any existing long position and initialize a new short with the default position size (position reversal). I've done this using the "EnterLong" and "EnterShort" methods.

    If, on the other hand, I want to merely "buy" and "sell", without reversing positions (unless a position reversal occurs naturally...i.e. Long 1 --> sell 1 = flat --> sell 1 --> Short 1).

    What methods should I be using so that a new long signal does not completely reverse a short position, and vice versa?

    Kind Regards,
    CG

    #2
    Hello cgeorgan,

    Yes, the default behavior is for entries to reverse positions.

    You can add a check to your entries to verify that you are flat.

    if (Position.MarketPosition == MarketPosition.Flat)
    EnterLong();

    This help guide article can help with setting this in the strategy wizard.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_RyanM View Post
      Hello cgeorgan,

      Yes, the default behavior is for entries to reverse positions.

      You can add a check to your entries to verify that you are flat.

      if (Position.MarketPosition == MarketPosition.Flat)
      EnterLong();

      This help guide article can help with setting this in the strategy wizard.
      I follow; is there a method to use what you've described here to merely sell part of a long position when a new short signal comes up, rather than sell the entire long and reverse?

      Comment


        #4
        In order to scale out of a position, you must first scale in. The scale out order quantity is then set from the quantity of your uniquely-named entry rules. The reference sample below can help with this:
        Scaling out of a position
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_RyanM View Post
          In order to scale out of a position, you must first scale in. The scale out order quantity is then set from the quantity of your uniquely-named entry rules. The reference sample below can help with this:
          Scaling out of a position
          Yes, I have noticed this methodology and have put it into use...that is, when I enter long positions, each unique entry generates a target exit and a trailing stop.

          However, sometimes I do not know where I want to exit part of my position, or where I thought I wanted to exit has now changed based on a new "sell" signal. Thus, if I was long at 1 with a target of 1.5, but my sell signal comes when price is 1.25, I now want to sell one of those contracts outright.

          I get the feeling you're going to tell me that I need to start looping through entries, matching orderID's, and adjusting target prices.

          I am hoping instead you'll tell me that somehow I can merely submit "buy" and "sell" orders that will do the following:
          -If I get a sell signal and i'm not long, create a new short position with associated target+stop;
          -If I get a sell signal and I'm long, sell one of my long contracts and cancel any associated target+stop orders.

          Comment


            #6
            Yes, using our managed order system will match exit quantities to the entry quantities based on signal name.

            We have introduced an unmanaged approach in our upcoming version 7. This will allow you more freedom, but the increased complexity means that there is more to manage on your own. Below link provides information on an unmanaged approach to strategy order submission.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by betsuni_123, Today, 04:20 PM
            0 responses
            1 view
            0 likes
            Last Post betsuni_123  
            Started by Aquila_Welokk, 04-29-2024, 01:14 PM
            2 responses
            22 views
            0 likes
            Last Post Aquila_Welokk  
            Started by samish18, 04-17-2024, 08:57 AM
            22 responses
            107 views
            0 likes
            Last Post samish18  
            Started by Ashkam, 04-29-2024, 09:28 AM
            2 responses
            26 views
            0 likes
            Last Post Ashkam
            by Ashkam
             
            Started by Felix Reichert, 04-26-2024, 02:12 PM
            6 responses
            41 views
            0 likes
            Last Post Felix Reichert  
            Working...
            X