Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to add two SetProfitTargets for one Entry order?

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

    How to add two SetProfitTargets for one Entry order?

    When I use a managed approach, I place one limit order 2 lots. Then I want to place two profit targets by 1 lot each. Can I do that using the Managed Approach?

    Can you provide me an example of code doing that?
    Thank you.

    #2
    Hello handlar,

    Thanks for your post.

    In the managed approach, the "set" methods will only deal with the total position (note that there is not a quantity field in the set method overloads), however this can be done through the use of "signal names" as described in the help guide for managed approach here: (See the section, " Order Entry Methods"): https://ninjatrader.com/support/help...d_approach.htm

    Using signal names would require you to place two entry orders with a different signal name, then you can create the set methods with those signal names and their respective target/stop values. The signal names also auto create the OCO relationship between SetProfit and SetStopLoss.

    Example:

    if (entry Condition)
    {
    SetProfitTarget("my1stentry, CalculationMode.Ticks, 10);
    SetProfitTarget("my2ndentry, CalculationMode.Ticks, 20);
    SetStopLoss(CalculationMode.Ticks, 10); // would apply to both entries if there there is no other signal named set stop loss.
    EnterLongLimit( 1, myLimitPrice, "my1stentry");
    EnterLongLimit( 1, myLimitPrice, "my2ndentry");
    }


    Please Note that this will also require you to change the setting of entries per direction or EntryHandling:


    Here is another example using multiple entry and exits (Not using set methods): https://ninjatrader.com/support/help..._exit_sign.htm

    Comment


      #3
      Thank you, PaulH! I'll try this approach.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      579 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X