Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Best way to reverse a position?

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

    Best way to reverse a position?

    I`m developing a strategy that is always in the market. What is the best way to reverse a position? Currently I just let EnterLong and EnterShort close the existing position, but checking my trades in IB, it does this using two trades.

    Example:
    BOT 100 SPY
    (Strategy reverses)
    SLD 100 SPY
    SLD 100 SPY

    It would save a lot of commissions if I could get it to do one transaction of 200 shares instead.

    #2
    Unfortunately this is the only manner available right now.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Saving on a short trade and staying in the market

      You can follow the following method and save the per trade commission if your broker charges that fee.

      1.BUY 100 shares of XYZ;/ initial step

      (If the conditions are right to reverse then you can put in the order as;

      2.SELL 200 shares of XYZ; / (loop)

      That way you are finally 100 shares SHORT and still in the market.

      3. BUY 200 shares of XYZ / then you are 100 shares long

      4. Go BACK to Step (2) / you are short 100 shares (repeat the loop)

      If you can develop a loop back to step (2) then you are done. I do not know whether NinjaScript has a loop. I am still new to NinjaScript programming.

      You save on the 'per trade' commission although you have to pay more for the extra shares sold (with my brokerage I could save $10.00 on the short trade by bundling the 2 short trades into one).

      That can make a big difference if I am trading 50 times a day.

      Hope I have been of some help to you

      Let me know whether you have found this answer helpful.

      Robert

      P.S. You can use also NinjaScript with the 'conditional' relationship defined in NinjaScript called 'CrossAbove' for set 1 and 'CrossBelow' for set 2. Set the 'LOOK BACK PERIOD'to 1. (This is covered in the Ninja Help Section).

      Look into the 'Strategy Wizard section of Ninja Help pages. If you are still confused you can come back to me.(It can be quiet confusing at first but when you get the hang of it -- it is very simple)

      In fact I have been using this programme today (24 September 2008) and it was pretty efficient.
      Last edited by robkim55; 09-24-2008, 04:09 PM. Reason: it was not clear and comprehensive enough

      Comment


        #4
        You will most likely not be able to do that in a NinjaScript Strategy. You probably cannot submit an Exit() order of greater quantity than your position.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          CloseAbove conditional functions

          Yes but one can use the 'Close Above" and 'Close Below" for simple averages - or any other averages. These are conditional statements in NinjaScript.

          This may not be adequate for some other indicators you are using. You have not indicated what indictors you are using so I have felt free to give you one that has worked for me.

          I hope this helps you although I realize that the solution might not be comprehensive enough for what you have in mind.

          Let me know whether this has helped you or not. I am new to Ninja so it is possible that I might have misunderstood your question.

          Robert

          Comment


            #6
            Robert,

            You cannot close a position and gain a new position in the opposite direction with the Exit() methods in NinjaScript. The Exit() methods will only allow you to close your position to flat. You cannot go EnterLong() for 100 and go ExitLong() for 200 and get 100 short.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Now I understand why I was making a mistake in my program. I had missed that point.

              Comment


                #8
                Could I request this as a feature for the next version of NT? It could potentially save several thousand dollars per year. Thanks!

                Comment


                  #9
                  Originally posted by Idruna View Post
                  Could I request this as a feature for the next version of NT? It could potentially save several thousand dollars per year. Thanks!
                  I personally thinks so.

                  Since we can short (and go long if we like) I cannot see why reversing using one order cannot be implemented.


                  Please NINJA reconsider.


                  RK

                  It is interesting to note that Ninja has an ATM that has a reverse on the SuperDOM -- on the same platform.
                  If they can allow it on the manual part of the platform I do not know why they cannot allow it on the automatic part of the platform!!!
                  Last edited by robkim55; 09-25-2008, 07:45 AM. Reason: Adding new material to the post

                  Comment


                    #10
                    In order to save one might consider a broker who gives discounts on round trips(RT).

                    That way a buy-and-sell order is charged a much lower commission than two separate trades.

                    Comment


                      #11
                      There are various internal signal tracking implications when it comes to automated trading. We are aware of this and have it on our list for future review.
                      Josh P.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

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