Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sell one contract only without closing whole position

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

    Sell one contract only without closing whole position

    Hello everybody,

    maybe a stupid question but it's so simple that I wasn't able to find a solution to it. Let's say I have 4 contracts LONG of ES (+4) which I opened using an ATM strategy. Now I wanna sell one contract (-1) so as a result I'm positioned with +3. How the hell can I do that? Simply clicking on "Sell Market" does not work.

    Any help appreciated. Thank you

    #2
    Hello,

    Thanks for your post.

    You can change the Quantity field on Order Entry windows to the desired number (1) instead of the previously submitted value (4) to only close a single contract of a position.

    Please let me know if I may be of any further assistance.
    Marco G.NinjaTrader Customer Service

    Comment


      #3
      That does not work. I change the number in the quantity field to "1" but when I press [CLOSE] then all 4 contracts are closed. And when I press [Sell Market] it doesn't work either. Testing on sim account.

      I found out why this didn't work in my test. My test account had 2300 USD. I am opening +4 ES which needs 2000 USD. At this time the excess margin is 300 USD and my position equal +4 long. Now when I enter "1" in the quantity field and press the button [Sell Market] I get the error that I do not have excess margin. That's weird, because this action would raise my excess margin after selling one contract. If you ask me, this is a bug in Ninjatrader which should be fixed. Please check on your own and let me know your findings.
      Last edited by patricia70; 06-17-2021, 06:43 AM.

      Comment


        #4
        Hello,

        Thanks for your reply.

        Yes, that would be the functionality of the Close button, to Flatten your position. You'd instead in that case submit a sell order for the Quantity of 1 using the Sell buttons.

        If you have any other pending orders such as stop loss orders or profit targets, these are taken into account for margin calculations as well.

        Please let me know if I may be of any further assistance.
        Marco G.NinjaTrader Customer Service

        Comment


          #5
          I found out why this didn't work in my test. My test account had 2300 USD. I am opening +4 ES which needs 2000 USD. At this time the excess margin is 300 USD and my position equal +4 long. Now when I enter "1" in the quantity field and press the button [Sell Market] I get the error that I do not have excess margin.

          That's weird and should not behave like this of course. Substracting a contract of the position will "free" money and should not take into account risk/margin. If you ask me, this possibly is a bug in Ninjatrader which should be fixed. Please check on your own and let me know your findings.
          Last edited by patricia70; 06-17-2021, 07:42 AM.

          Comment


            #6
            Well, after some additional testing this thing getting more weird. In the example above you even cannot change limits any more. The error message appears, that there is no excess margin available. Although you narrow down the stop-loss limit or alterting the take-profit limit. This should NOT be, this obviously is not correct. Is this a known bug, have this been reported already? Please any help how to fix this behaviour.

            Comment


              #7
              Hello,

              Thank you for your reply.

              For your question,
              CRITICAL — If your inquiry involves live orders, please always reach out to your broker's Orders Desk immediately to confirm and manage your live orders and positions.

              If your trades are with NinjaTrader Brokerage, you can contact NinjaTrader Brokerage Order Desk here:
              Please send me your log and trace files so that I may look into what occurred.

              You can do this by going to the Control Center-> Help-> Email Support

              Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.

              Please reference the following ticket number in the body of the email: 3146187 Max

              I look forward to solving your inquiry.

              Comment


                #8
                Hello Max and thanks for your assistance. Unfortunately you didn't understand correctly, this is nothing related to my live account. This is something everyone could test on his own even with the sim account. See example above or following additional example:

                1) set the sim account to 350 USD and use it for the trade on the following steps

                2) [Buy Market] 3 contracts of MNQ (note: 1 contract MNQ needs 100 USD margin, so you can buy maximum three contracts, the excess margin will be 50 USD. You can even use ATM strategy to set a stop-loss and take-profit target

                After the position of +3 have been opened and the excess margin remains less than 100 USD, you

                --> are NOT able to modify either the stop-loss or the take-profit target.
                --> are NOT able to sell one or more contract, although this would raise your account balance and the excess margin.

                The error message is "Not enough excess margin!". This is not correct and expected behaviour as everyone's realizing.
                Feel free to test on your own and share your thoughts.

                Comment


                  #9
                  Originally posted by patricia70 View Post
                  this is nothing related to my live account.
                  Doesn't it have everything to do with your account?
                  (Well, sort of, the account size, instrument, and position size are the three
                  items under your control that have an impact on margin).

                  I mean, it's very related to the size of your account,
                  ... and the number of contracts you're trading,
                  ... and the margin requirements for the instrument,
                  ... which are set by the broker,
                  ... typically using minimums set by the exchange.

                  I would suggest you are not fully understanding your margin requirements,
                  and/or the math behind them (see EDIT below).

                  Quite simply, you are using too much of your margin.
                  You are over leveraging.

                  Even this example leaves $1000 of free margin.

                  You should contact your broker and ask specifically about margin requirements
                  needed to modify or exit a position you are currently holding. Give them
                  the exact details of what you see happening in this thread. Get them to clearly
                  explain the terms and formulas behind the requirements.

                  I suspect your broker requires (some or all) of the initial margin for each buy
                  and sell -- regardless of what your current position happens to be -- thus perhaps
                  margin is still needed to sell contracts from your current long position -- ask
                  your broker if this is the case.

                  Also, the fact that NinjaTrader simulates your live account margin requirements
                  in Sim101 is a good thing. I mean, that's a feature, not a bug.

                  EDIT:
                  I'm not an expert on the math behind margin calculations -- I don't typically
                  need to care. In fact, that's a major caveat of trading so close to the margin
                  requirements (which happens more often on small account sizes) -- you really
                  need to understand the trading limitations imposed by margin requirements
                  better than the average trader.
                  Last edited by bltdavid; 06-17-2021, 09:24 PM. Reason: expand answer

                  Comment


                    #10
                    Dear David,

                    first of all I want to thank you for your post and the time you took. Despite everything, there is no point in glossing over something or talking past something or presenting the matter in a twisted way. I am very familiar with margin requirements and trading contracts and I am aware of how the process works. However, you either didn't read the post properly or didn't understand it, maybe it's my bad English for which I apologize.

                    Therefore, I would like to present this clearly again, because it is simply a wrong functionality in the trading software Ninjatrader. Why I can say this is very simple: I (we) also work with other trading desks since years. In none, really in NO other trading platform is this flaw present. This is simply fatal, because Ninjatrader forbids the trader to change or liquidate a position or a contract like this, EVEN IF this action would work in favor of the account balance and force more money in the account. The two examples are more than enough.

                    The given examples can be understand and tried by every Ninjatrader user out there, both on a live account and in the demo account. Just try it and you will understand.

                    The Ninjatrader software simply has the bug that when a position is opened, a simple and blanket check is made whether there is enough margin. And exactly here lies the catch. Correctly, the software must check further and be able to determine whether this action leads to favor or to the detriment of the account balance.

                    You don't seriously want me to believe that the trader should not be able to close a position whenever he wants to? Because that is what happens in this case, that is a strong restriction against the customers and should be checked. Therefore, I can only encourage Ninjatrader to address this issue, test for themselves and take appropriate ways and steps to correct this grievance.

                    Comment


                      #11
                      Originally posted by patricia70 View Post
                      it is simply a wrong functionality in the trading software Ninjatrader. Why I can say this is very simple: I (we) also work with other trading desks since years. In none, really in NO other trading platform is this flaw present. This is simply fatal, because Ninjatrader forbids the trader to change or liquidate a position or a contract like this, EVEN IF this action would work in favor of the account balance and force more money in the account.
                      Actually, I do share your frustration.

                      My futures trading experience is limited to NinjaTrader.

                      During my tadpole days, I'm pretty certain I ran into this problem on my live money
                      account with RCG/Continuum, and, I think, later with TopStepTrader/Rithmic.

                      I, too, never fully understood why buy/sell actions on existing positions that would
                      have favorable results for the account balance (as you say, forcing money into the
                      account) could be denied by margin rules. At the time, I just presumed margin is
                      a different beast in the futures world. That and I sheepishly backed off asking
                      more questions, since the fault was "mine" for trading too close to the margin
                      requirements -- the understanding being -- I shouldn't be doing that.

                      Kind of like when one complains "Doctor, it hurts when I bend my knee" and the
                      only remedy he tells you is "Well, don't bend your knee" -- that was me as the
                      main remedy I quickly adopted was to stop trading so close to the margins.

                      And, as you pointed out, this is arguably a platform question, since the behavior
                      is reproducible in Sim101 -- meaning (one can presume) one or more 'standard'
                      margin formulas are at work under the hood.

                      I look forward to the fuller explanations from NinjaTrader support.

                      Comment


                        #12
                        Hello Everyone,

                        Thank you for your posts.

                        This is Heath responding on behalf of Max to provide some additional clarification and clear up some misunderstanding that I'm seeing in the understanding of margin requirements in the platform.

                        Firstly it's important to understand that when it comes to live orders, margin rejections are not controlled by the platform. Those rejections are sent from the brokerage directly. The NinjaTrader platform has no control over these rejections. If you have questions about why a live order or position was rejected you'll need to reach out to your broker directly.

                        When using the platform in SIM mode, the margin requirements for your positions are simulated by the risk profile settings you choose for that account. These settings are not perfect and do not always reproduce 100% what would occur in a live environment, as will all things related to the SIM account we do our best to approximate commission, margin, slippage and other real world conditions that occur when trading live. However because these order are only locally simulated in your machine and not actually sent to your broker to confirm their requirements are being met, as they would with a live order.

                        Additionally, please remember that unrealized PnL does not contribute to your SIM account balance or increase your available margin, only closed and completed trades contribute to these values.

                        I'll provide more insight using Patricia's example

                        Originally posted by patricia70 View Post

                        1) set the sim account to 350 USD and use it for the trade on the following steps

                        2) [Buy Market] 3 contracts of MNQ (note: 1 contract MNQ needs 100 USD margin, so you can buy maximum three contracts, the excess margin will be 50 USD. You can even use ATM strategy to set a stop-loss and take-profit target

                        After the position of +3 have been opened and the excess margin remains less than 100 USD, you

                        --> are NOT able to modify either the stop-loss or the take-profit target.
                        --> are NOT able to sell one or more contract, although this would raise your account balance and the excess margin.
                        This is correct and to be expected. In this scenario you have a current position of 3 orders on the MNQ which carries an account requirement of $300 ($100 per position) increasing this position to 4 contracts would be rejected because your account does not have the requisite additional $100 to carry this position.

                        Your required margin would not change based on any unrealized PnL as this is all still money in play and in flux, even if you're up significantly the market could turn against you at any time on these positions and result in your emptying your account. You say that this WOULD result in more money in your account, but this is not true, it only COULD result in more money. Until those positions are closed that money is not "in your pocket" but still on the table. This is not profit that increases your available margin, this is risk that is still in play.

                        As such it is to be expected when trading SIM that increasing your open positions in any market increases the inherent risk in that market and the required margin needed to maintain those positions.

                        Please feel free to write in if you have any additional questions.
                        Heath R.NinjaTrader Customer Service

                        Comment


                          #13
                          Thanks, Heath.

                          Using Patricia's example, can you further address the last two lines
                          of what you quoted?

                          You say she's trying to increase her position to 4 contracts, and the
                          available margin is insufficient. Ok, sure, that makes perfect sense.

                          But that's not what she's doing.
                          She's trying to decrease her position, not add to it.

                          Please explain the margin calculations that are causing the errors.

                          I mean, please continue your answer to the conclusion she is seeing.
                          Why is she unable to modify the stop or target orders?
                          Why is she unable to sell a contract?

                          Especially, please explain that last one:
                          How come she gets a margin error when trying to decrease her position?

                          Make sure your answer uses the term "excess margin", so that we
                          can circle-back and appreciate the full context of the error messages
                          she was getting.

                          Thanks!

                          Comment


                            #14
                            Hello Everyone,

                            Thank you for your reply.

                            In the example provided above with naked orders, you can sell market and decrease your excess intraday margin without issue. I have tested this thoroughly on the platform.


                            However Patricia's original post mentioned using an ATM with Stops and targets attached. Those resting orders would also impact your available excess margin, and the SIM account only knows that when you place an order to that market that additional Stop and Targets would be created which if an error were to occur with these orders, would further increase your margin. This is expected.

                            The key behind this is that in these instances the platform sees the orders that would "be submitted" as additional risk in the Worst Case Position (WCP) calculations, before the order is submitted and rejects the order due to the potential risk.

                            This is the same reason why you may get a margin error on a target order of an ATM. Theoretically a target order will only decrease your risk, but there's a fraction of a chance you get a few in flight execution errors that could result in a WCP of more contracts then your intended position so it throws the error.

                            The ultimate solution here is to not trade this close to margin. However this behavior in SIM is intentional as it mirrors the risk behaviors of our live brokerage accounts.

                            Please let me know if you have any additional questions.
                            Heath R.NinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Perr0Grande, Yesterday, 08:16 PM
                            1 response
                            7 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Started by f.saeidi, Yesterday, 08:12 AM
                            3 responses
                            24 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Started by algospoke, Yesterday, 06:40 PM
                            1 response
                            14 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Started by quantismo, Yesterday, 05:13 PM
                            1 response
                            14 views
                            0 likes
                            Last Post NinjaTrader_Gaby  
                            Started by The_Sec, 04-16-2024, 02:29 PM
                            3 responses
                            16 views
                            0 likes
                            Last Post NinjaTrader_ChristopherS  
                            Working...
                            X