Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit handling

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

    Exit handling

    When Backtesting for a multi-instrument strategy, with all entries for every instrument being based on the same entry conditions, can one single ExitLong() be used for all open positions or is a seperate ExitLong() needed for each instrument with the signal name specified?

    I have..

    entryOrder1, entry Order2 etc. for each instrument.

    Can I just have one ExitLong() for all entryOrders?

    Or do I need to have ExitLong("", entryOrder1, ""), ExitLong("",entryOrder2, "") etc.?
    Last edited by zachj; 11-10-2013, 03:41 PM.

    #2
    Hello zachj,

    Thank you for your post.

    ExitLong() will close all long positions, there is no need to tie it to all entries orders. If you specify the quantity for the Exit() method it will close that quantity.

    For information on the Managed Order Approach including the Exit() methods please visit the following link: http://www.ninjatrader.com/support/h...d_approach.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      Just a quick follow up to this, what about with CancelOrder(), I have to have a seperate one for each entryOrder correct? Or can there be a single one as with ExitLong()

      if (entryOrder1 != null){CancelOrder(entryOrder1);}
      if (entryOrder2 != null){CancelOrder(entryOrder2);}

      Comment


        #4
        Hello zachj,

        Thank you for your response.

        CancelOrder() requires the input of an IOrder object, so you will only be able to cancel one order with each CancelOrder() call. For information on IOrder objects please visit the following link: http://www.ninjatrader.com/support/h...nt7/iorder.htm

        Please let me know if I may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        662 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        376 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        580 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X