Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetProfitTarget

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

    SetProfitTarget

    Hi,

    I have been using:

    EnterLongLimit()
    with
    SetStopLoss()
    and
    SetProfitTarget()

    and these have been working fine. However I recently had an in-flight issue after a partial fill, whereby my original trade position was not confirmed back as fully filled and my stop and target orders ended up being rejected as they took my net worst-case position over my account limit.
    To prevent another in-flight issue I would like to delay the SetProfitTarget() half of the order by a few ticks or, say by a 1min bar update, in order that the original trade will always be confirmed back before both stops and target orders get sent in.
    However, when I delay the SetProfitTarget() by a bar it does not get sent, and I only get a stop with my position, no target limit order.
    Is there a way to delay this SetProfitTarget() so that it is still tied to my trade? thanks

    #2
    Originally posted by Pourleau View Post
    Hi,

    I have been using:

    EnterLongLimit()
    with
    SetStopLoss()
    and
    SetProfitTarget()

    and these have been working fine. However I recently had an in-flight issue after a partial fill, whereby my original trade position was not confirmed back as fully filled and my stop and target orders ended up being rejected as they took my net worst-case position over my account limit.
    To prevent another in-flight issue I would like to delay the SetProfitTarget() half of the order by a few ticks or, say by a 1min bar update, in order that the original trade will always be confirmed back before both stops and target orders get sent in.
    However, when I delay the SetProfitTarget() by a bar it does not get sent, and I only get a stop with my position, no target limit order.
    Is there a way to delay this SetProfitTarget() so that it is still tied to my trade? thanks
    I believe the Set methods must be in place before the trade is entered. To do what you want, you are going to have to use ExitLongLimit() to set your profit target. You probably want to use OnExecution() or OnPositionUpdate() to determine the exact quantity you need for your ExitLong.

    NT has a reference sample, ref: http://www.ninjatrader.com/support/f...ead.php?t=7499

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 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
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X