• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

exiting multiple positions independently

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

    #16
    Hello ShruggedAtlas,

    Thank you for your response.

    There is no option or expected behavior that would allow for exiting based on specific entries on the same account and instrument. The only way this is handled is through exiting the same quantity of the entry.

    How were you selecting the position to exit in your use case where exiting the position was working contrary to my note on this post?

    I look forward to assisting you further.
    Patrick H.NinjaTrader Customer Service

    Comment


      #17
      I created the accompanying fake image produced in a paint program to show you what I was able to see and interact with on the chart when I first created and tested my Oanda account using NT 7 chart trader with manual trades . Of course Oanda requires that each entry be a different size for this to work. If both were the same size you cannot exit one or the other but are required to exit both at the same time but I assure you NT 7 did look more or less the same as the picture I created.

      I also want to reiterate that this works perfectly in simulated account using strategy entry codes such as:

      Code:
                 // SE1 ENTRY
      			if (Setup && Trigger && MarketCondition == 4) //bearish trend
      			{
      				StartPosition = 1000;
      				EnterShort(Convert.ToInt32(StartPosition), @"SE1");
      			}
      			 // SE2 ENTRY
      			if ((Position.Quantity == StartPosition) && Trigger && InTrade && MarketCondition != 1)
      			{
      				EnterShort(Convert.ToInt32(StartPosition * LeverageFactor), @"SE2");
      			}
      and exit codes such as:
      Code:
      			if ((Position.MarketPosition == MarketPosition.Short)
      				 && (Position.Quantity == StartPosition)
      				&& (Close[0] < Position.AveragePrice)
      				 && (Close[0] < Swing1.SwingLow[0]))
      			{
      				ExitShort(Convert.ToInt32(StartPosition), @"SExit1", @"SE1");
      			}
                              //SE2 EXIT
      			if ((Position.Quantity == StartPosition * 3)
      				  && (Close[0] < Position.AveragePrice))
      			{
      				ExitShort(Convert.ToInt32(StartPosition * LeverageFactor), @"SExit2", @"SE2");
      			}
      Attached Files

      Comment


        #18
        Hello ShruggedAtlas,

        Thank you for the additional detail.

        In NinjaScript strategies using signal names is the appropriate means to enter and exit the same quantities and ensure you are exiting the appropriate positions as NinjaTrader sees them for the strategy instance.

        In manually trading can you detail how you would exit the positions? Did you exit the first entry first followed by the second for example?

        I look forward to your response.
        Patrick H.NinjaTrader Customer Service

        Comment


          #19
          I'm afraid it's been a few months now since I was able to do this and can't recall exactly how I exited the individual positions. I switched to NT 8 soon after and deleted NT 7 and cannot reproduce the exact conditions because NT 7 installation efforts are met with errors.

          I have given up on this for now. I don't believe this is a resolvable issue because there are too many unknown variables involved.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by tonynt, Today, 01:42 AM
          0 responses
          6 views
          0 likes
          Last Post tonynt
          by tonynt
           
          Started by NT-Roland, Yesterday, 04:36 PM
          0 responses
          3 views
          0 likes
          Last Post NT-Roland  
          Started by Newtrader101, Yesterday, 03:40 PM
          2 responses
          11 views
          0 likes
          Last Post Newtrader101  
          Started by Branpo, Yesterday, 02:58 PM
          2 responses
          12 views
          0 likes
          Last Post Branpo
          by Branpo
           
          Started by sdauteuil, Yesterday, 02:09 PM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X