• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 FiftyFib FX, Today, 01:45 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by stoner, Today, 02:36 PM
    0 responses
    1 view
    0 likes
    Last Post stoner
    by stoner
     
    Started by victorsmith, Today, 02:23 PM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by juju075, Today, 02:04 PM
    0 responses
    7 views
    0 likes
    Last Post juju075
    by juju075
     
    Started by researcher247, Today, 01:21 PM
    3 responses
    5 views
    0 likes
    Last Post NinjaTrader_Tyler  
    Working...
    X