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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    212 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    121 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    145 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    228 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    188 views
    0 likes
    Last Post CarlTrading  
    Working...
    X