Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reversing a position with a single order

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

    Reversing a position with a single order

    If I am long a single share, and I decide I want to be short a single share, is there a consensus/best practice way to do that with a single order? Does the answer vary by provider?

    I currently sell out and then short with two sequential orders, but that introduces latency I'd like to avoid if possible.

    Before I spend time experimenting with what may or may not work, I figured I'd ask to see if there is a time-saving easy answer from someone.

    #2
    Hello,

    You can utilize the 'Rev' button in any order entry window to reverse your position for an equal amount of contracts. For example, if long 2 contracts reversing would make you short 2 contracts. This is done with 2 orders, with a market order to close out the 2 long contracts followed by a market order to sell 2 contracts short.
    Ryan S.NinjaTrader Customer Service

    Comment


      #3
      I'm sorry, I was not remotely clear enough here.

      I am making orders from within an AddOn. This is not a UI question, but an API question.

      I'm trying to avoid using an order to close out a position and then a new order for opening a new position.

      For instance, if I am long 1 share, can I sell 2 shares to be short a share?
      Last edited by carnitron; 03-25-2024, 01:02 PM.

      Comment


        #4
        Hello,

        This would all be handled in the script you are submitting orders from. If you have any questions regarding how to configure this in your script you may want to consult one of our programming forums for assistance.
        Ryan S.NinjaTrader Customer Service

        Comment


          #5
          Wait, I've asked many technical and API related questions on this forum, right here. Can someone else with Add On expertise reply to this thread? Or are you suggesting I try "General Development"?
          Last edited by carnitron; 03-25-2024, 01:09 PM.

          Comment


            #6
            Hello,

            The development sections of our forum can assist with scripting questions in NinjaScript. This sections is more for platform functionality questions that come standard with NinjaTrader
            Ryan S.NinjaTrader Customer Service

            Comment


              #7
              I am not clear what you mean by "development sections of our forum". Do you have a link to this? Under NinjaTarder Desktop, I see "Platform Technical Support", "General Development", "Indicator Development" and "Strategy Development". This isn't an indicator or a strategy. So I guess that leaves "General Development," like I asked in my last post?

              FWIW, I think this could be considered a platform issue, to some extent, if this kind of mechanism is available with some brokers but not others. But whatever, I just need someone to answer my question, instead of going back and forth like this.

              Regardless, I have reposted this question to "General Development", in the hopes that it is the right place.
              Last edited by carnitron; 03-25-2024, 02:01 PM.

              Comment


                #8
                Hello,

                Any of the 'Development' oriented sections of the forum you mentioned can be used for assistance from our scripting team. As mentioned the functionality of the reverse button is hard coded, but this functionality can be simulated in various ways within NinjaScript.
                Ryan S.NinjaTrader Customer Service

                Comment


                  #9
                  FWIW, this appears to actually be a backend issue:

                  Reversing a position with a single order in an AddOn - NinjaTrader Support Forum​

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by fx.practic, 10-15-2013, 12:53 AM
                  5 responses
                  5,404 views
                  0 likes
                  Last Post Bidder
                  by Bidder
                   
                  Started by Shai Samuel, 07-02-2022, 02:46 PM
                  4 responses
                  95 views
                  0 likes
                  Last Post Bidder
                  by Bidder
                   
                  Started by DJ888, Yesterday, 10:57 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by MacDad, 02-25-2024, 11:48 PM
                  7 responses
                  159 views
                  0 likes
                  Last Post loganjarosz123  
                  Started by Belfortbucks, Yesterday, 09:29 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post Belfortbucks  
                  Working...
                  X