Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Positions and Order Management

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

    Multiple Positions and Order Management

    I am trying to create a strategy that will allow multiple entries per direction. Every entry should have it's own profit target and stop loss order.

    Assume I have 3 open long positions with stops and profit targets working. Now I get a signal to enter a short trade as well. If I use the EnterShort(), it exits my 3 open long trades and leaves me short 1 position. I want it to enter a single short position, which should leave the overall position at long 2. I've tried adding conditions to use ExitLong() in this particular scenario, but the problem I have then is the stops and targets on my short entry, since I never issued an EnterShort(). Additionally, if my position changes from long to short, my ExitLong() orders are no longer valid since I don't have a long position.

    Is there any way around this?

    #2
    Hi toptrader,

    The behavior you are seeing with EnterShort() is expected. Any long positions will be exited, and a short positions will be entered.

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

    Comment


      #3
      Tim,
      I am scaling in to positions. So if I scale in to a position (1 at a time) of long 3 contracts, then get a short signal, I want the short signal to execute, but not exit the long position. Therefore my position should be long 2 after the short order is filled, and I should have profits and stops for 3 long positions and one short position. Is this possible?

      Comment


        #4
        Hi toptrader,

        If you want to exit just one of your positions (of the three that you scaled in to), you can do so with an ExitLong or one of the Set()'s, by specifying the "fromEntrySignal".

        If you want to have 3 long positions, and a simultaneous 1 short position in a strategy, you will need two separate strategies.
        TimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        647 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        369 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X