Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How could I know which ProfitTarget order is hit!?

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

    How could I know which ProfitTarget order is hit!?

    If I use SetProfitTarget on different entry orders, they're both called "Profit target" internally, so how could I know which is it!?

    For example:

    Code:
    EnterLong("Long1");
    SetProfitTarget("Long1",CalculationMode.Ticks,100,true);    //Named "Profit target" internally.
    EnterLong("Long2");
    SetProfitTarget("Long2",CalculationMode.Ticks,100,true);    //ALSO named "Profit target" internally.

    #2
    Hello YoutingChu,

    Thanks for your post.

    As you are using signal names with the entry orders ("Long1" and "Long2"), in the OnOrderUpdate() method you could check to see if the order.Name is "Profit target" and the order.FromEntrySignal is "Long1" or "Long2".

    References:

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    81 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    149 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    79 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    52 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    59 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X