Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Partial Exits via the API

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

    Partial Exits via the API

    Hi,

    2 really quick questions...

    1) I'm trying to implement scaling out via the API (single order to enter position, multiple orders to exit position) and found the following overloaded method.

    ExitLong(int quantity, string signalName, string fromEntrySignal)


    I'm not sure why I need to specify the entry signal? I'm assuming it's due to NT's internal order handling logic. What I really need is a method with the signature:


    ExitLong(int quantity, string signalName)


    Why doesn't it exist? Seems silly to me to force exit orders to be tied to entry orders. There might be multiple entry orders and multiple entry orders. Why is their a forced requirement to reconcile them?


    2) The documentation for the method


    ExitLong(int quantity, string signalName, string fromEntrySignal)

    states:

    Parameters
    fromEntrySignal - The entry signal name. This ties the exit to the entry and exits the position quantity represented by the actual entry.


    quantity - Entry order quantity.


    This seems to be contradictory. On one side it's saying you can specify the exact quantity to exit and on the other side it's saying the exit quantity will be equal to the quantity of the corresponding entry.


    Which is it?




    #2
    ScoobyStoo,

    If you don't want to tie it to a specific entry just submit it with a specific quantity and nothing else.

    If you specify a quantity it overrides and will exit the specified quantity, otherwise, the quantity of the associated signal name.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Ok, thanks. But I need to supply an identity for the order so I can reconcile executions. This is only possible if I also supply an entry signal parameter. Do you see my point? Looks to me like there's an overload missing.

      Comment


        #4
        If you want to provide signal names you will need to link it to an entry.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          If you want to provide signal names you will need to link it to an entry.
          Does this change in NT7?

          Comment


            #6
            ScoobyStoo, will need to check into, not aware of changes in this regard for NT7.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            648 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