Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Managed Order Approach - Multiple TP Levels

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

    Managed Order Approach - Multiple TP Levels

    I have a strategy that works in an unmanaged approach, and I am trying to make a new version using a managed approach with this structure:

    1. Entry: Two separate entry orders (same direction)
    EnterShortLimit(0, true, qty1, price, "SHORT_ENTRY_TP1");
    EnterShortLimit(0, true, qty2, price, "SHORT_ENTRY_TP2");

    2. Protective Orders:
    o One shared price position for the stop loss:
    SetStopLoss("SHORT_ENTRY_TP1", CalculationMode.Price, stopPrice, false);
    SetStopLoss("SHORT_ENTRY_TP2", CalculationMode.Price, stopPrice, false);

    o Two separate take profits:
    ExitShortLimit(qty1, tp1Price, "SHORT_TP1", "SHORT_ENTRY_TP1");
    ExitShortLimit(qty2, tp2Price, "SHORT_TP2", "SHORT_ENTRY_TP2");

    Behavior during tests:
    • Entries and stop loss work correctly
    • TP orders are ignored with error messages:
    "Exit() method ignored: Internal Order Handling Rules"

    I know that the Managed Approach has a lot of limitations, and although my interpretation of the Internal Order Handling Rules shows that it is not possible to work the way I want, let me clear this out and ask the following questions:
    1. Is this structure possible in managed mode?
    2. If yes, what's the correct way to link TP orders to their respective entries?

    Thank you for your guidance!

    #2
    Hello faccipieri,

    Thank you for your post.

    Here is a link to the managed order handling rules in our Help Guide:

    https://ninjatrader.com/support/helpGuides/nt8/index.html?managed_approach.htm#InternalOrderHandl ingRulesThatReduceUnwantedPositions

    You had mentioned that your exit methods (take profit orders) are being ignored.

    I suspect that this is the rule that is causing the exit method orders to be ignored:
    "Methods that generate orders to exit a position will be ignored if:
    A position is open and an order submitted by a set method (SetStopLoss() for example) is active".
    I advise that you avoid using Enter/Exit methods in combination with Set methods, and instead chose one method type.

    For example, you could use SetProfitTarget instead of ExitShortLimit.
    Reference Sample - Modifying the price of stop loss and profit target orders

    Or, instead of using Set() methods to submit stop-loss or profit target orders, you can submit and update them manually through the use of Order and Execution objects in the OnOrderUpdate() and OnExecutionUpdate() methods.
    Reference Sample - Using OnOrderUpdate() and OnExecution() methods to submit protective orders

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

    Comment


      #3
      Hi Eduardo.

      Thank you for your response.

      I wanted to follow up and let you know that I was able to successfully place the entry order along with the associated stop loss and take profit orders. I used ExitShortStopMarket for the stop loss and ExitShortLimit for the take profit, and everything worked as expected for an order with a single TP and a single SL (which was not what I wanted).

      Now, I have a follow-up question:

      Is there a way to split the targets from an order into two separate take profits (TP1 + TP2) while using the managed approach? Specifically, I would like to have:
      • Two open orders
      • Two stop losses (one for each order)
      • One take profit for TP1
      • One take profit for TP2
      Or any other configuration that allows me to have 2 TPs instead of only one.

      If this is possible, what would be the correct way to implement it within the managed approach?

      I appreciate your insights and guidance!

      Cheers

      Comment


        #4
        Hellofaccipieri,

        Thank you for your reply.

        Splitting your position into two entries, with their own profit targets/stop losses is straightforward with the managed approach [link].
        NinjaTrader’s exit methods allow you to tie each exit to a particular entry signal.

        With the managed approach, you will need to use separate entry orders with unique signal names for each quantity you want to scale in/out of.

        To achieve what you've mentioned, submit two entries (each of size 1) with distinct signal names, then create a stop-loss and a profit target order with the method overloads that use fromEntrySignal, for each entry (using the entry signal name).

        For more details on the ExitShortStopMarket and ExitShortLimit overloads, please see the following NinjaTrader Help Guide pages:Please let me know if I may be of any further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        25 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        120 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        64 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        41 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X