Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why can I not close out partial positions?

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

    Why can I not close out partial positions?

    Hello,

    I'm having great difficulty trying to completely close Long OR Short positions that have previously had part of the position closed out. I seem to be only able to close positions that have the same number of units as had been originally entered when the trade was opened.

    For example if I'm trying to close a max. of 3 open Long positions using the following code it will not work if part of the positions have been previously exited:

    if(Position.MarketPosition == MarketPosition.Long)
    {

    ExitLong("TRADE HI1");
    ExitLong(
    "TRADE HI2");
    ExitLong(
    "TRADE HI3");
    }

    I was under the impression that "ExitLong/ExitShort" was supposed to completely close a position regardless of how many units remain from the original opening...but this seems not the case...how am I supposed to close these "partial" positions??? Thank you.

    #2
    Hi Burga1,

    If you want to scale out of a position, you must first scale in, as in this sample - http://www.ninjatrader.com/support/f...ead.php?t=3751
    TimNinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply and info.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      595 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      343 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      556 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      554 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X