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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        68 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        37 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        62 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
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X