Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IExecution and SetProfitTarget

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

    IExecution and SetProfitTarget

    How can I catch the SetProfitTarget execution when the target is it? Basically, how can I differentiate a new order from a hit target order in the OnExecution method?

    #2
    Hello,

    Thank you for your post.

    The execution name for a profit target is "Profit target". You can detect this in the execution / order name.

    For example:

    if (execution.Name == "Profit target")
    {
    // execute code
    }

    (Try printing the execution.Name for each order to see what order names are used.)
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, Yesterday, 11:51 AM
    0 responses
    17 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, Yesterday, 11:48 AM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-25-2026, 09:53 PM
    0 responses
    19 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 03-25-2026, 09:51 PM
    0 responses
    13 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 03-23-2026, 11:13 AM
    0 responses
    20 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X