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.

    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.

        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 arvidvanstaey, Today, 02:19 PM
          4 responses
          11 views
          0 likes
          Last Post arvidvanstaey  
          Started by samish18, 04-17-2024, 08:57 AM
          16 responses
          61 views
          0 likes
          Last Post samish18  
          Started by jordanq2, Today, 03:10 PM
          2 responses
          9 views
          0 likes
          Last Post jordanq2  
          Started by traderqz, Today, 12:06 AM
          10 responses
          18 views
          0 likes
          Last Post traderqz  
          Started by algospoke, 04-17-2024, 06:40 PM
          5 responses
          48 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X