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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        64 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        35 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        59 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        51 views
        0 likes
        Last Post CarlTrading  
        Working...
        X