Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding to a position

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

    Adding to a position

    If lets say im short with 2 cars and add 1, now have a total position size of 3 cars. Now lets say I go to close 1 car, id like to close the add and not the original. Anyway to do that? Ninja seems to automatically close the original position before closing the more recent adds. Thanks.

    #2
    Originally posted by YoungOne View Post
    If lets say im short with 2 cars and add 1, now have a total position size of 3 cars. Now lets say I go to close 1 car, id like to close the add and not the original. Anyway to do that? Ninja seems to automatically close the original position before closing the more recent adds. Thanks.
    Hello YoungOne,

    Thank you for your post.

    Unfortunately this is not possible.

    Please see this link as to why FIFO is used to optimize your orders: http://www.ninjatrader-support.com/H...imization.html
    Ray S.NinjaTrader Customer Service

    Comment


      #3
      That sucks. I can't take a small loss on an add and keep an original position going eh?

      Comment


        #4
        Unfortunately you are correct.
        Ray S.NinjaTrader Customer Service

        Comment


          #5
          Adding to a Strategy...

          I have a similar question..

          Is it possible, in the Strategy wizard to add a second contract to my Long(or Short) position if market turned against me for a predetermined nr of ticks?
          If is not possible within the Wizard, what line of code should I add in the unlocked strategy?
          Thanks, Michael.

          Comment


            #6
            Originally posted by mich58 View Post
            I have a similar question..

            Is it possible, in the Strategy wizard to add a second contract to my Long(or Short) position if market turned against me for a predetermined nr of ticks?
            If is not possible within the Wizard, what line of code should I add in the unlocked strategy?
            Thanks, Michael.
            Hello Michael,

            You can add ATM strategies into your NinjaScript Strategy with a reverse at close which may help: http://www.ninjatrader-support.com/H...egyCreate.html
            Ray S.NinjaTrader Customer Service

            Comment


              #7
              Thank You for the reply.
              Reversing position will affect the cost of the transaction. I don't want to reverse. I just want to add a second contract to the exiting one.
              Let me rephrase the initial question...If I am in a trade with one contract and I want to add a second contract when a condition is met, what statement would I use?
              Here is an example:

              if (Position.MarketPosition == MarketPosition.Long
              && CrossAbove(EMA(5), EMA(14), 1))
              {
              ""statement for the second contract""
              }

              Comment


                #8
                To enter again you just call another entry order.

                Just go EnterLong() again. In order to do this you need to also ensure that your strategy's EntriesPerDirection is set higher than 1.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Thank You, Josh.

                  Comment


                    #10
                    EntriesPerDirection is set in the initialize method?

                    Comment


                      #11
                      Yes, correct - http://www.ninjatrader-support.com/H...Direction.html
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        the size of the entries is not looked at right? it is only the number of times the position is added onto.

                        also
                        if a long position of say n entries is built up will a EnterShort() result in all n of the long positions being exited and a short position being put on?

                        Comment


                          #13
                          Hello,

                          You are talking about scaling out. This link describes it in detail:


                          Let me know if you have questions.
                          DenNinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by xiinteractive, 04-09-2024, 08:08 AM
                          4 responses
                          12 views
                          0 likes
                          Last Post xiinteractive  
                          Started by Mupulen, Today, 11:26 AM
                          0 responses
                          1 view
                          0 likes
                          Last Post Mupulen
                          by Mupulen
                           
                          Started by Sparkyboy, Today, 10:57 AM
                          1 response
                          5 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Started by swestendorf, Today, 11:14 AM
                          2 responses
                          4 views
                          0 likes
                          Last Post NinjaTrader_Kimberly  
                          Started by TheMarlin801, 10-13-2020, 01:40 AM
                          21 responses
                          3,917 views
                          0 likes
                          Last Post Bidder
                          by Bidder
                           
                          Working...
                          X