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 kujista, Today, 06:23 AM
    0 responses
    1 view
    0 likes
    Last Post kujista
    by kujista
     
    Started by traderqz, Yesterday, 04:32 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by f.saeidi, Today, 05:56 AM
    1 response
    4 views
    0 likes
    Last Post Jltarrau  
    Started by Jltarrau, Today, 05:57 AM
    0 responses
    4 views
    0 likes
    Last Post Jltarrau  
    Started by Stanfillirenfro, Yesterday, 09:19 AM
    7 responses
    53 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X