Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetProfitTarget

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

    SetProfitTarget

    Hi, I want to have 3 different profit targets from one entry. So I execute a market order for 3 contracts and want o exit each contract with a separate target. Can you direct me to a resource or example on how to accomplish this? Thank you

    #2
    Hello pman777,

    Thank you for the post.

    You must have a unique signal name for each contract. You can write something similar to the following to set individual targets for the same entry.

    Code:
    EnterLong("Entry0");
    EnterLong("Entry1");
    EnterLong("Entry2");
    
    SetProfitTarget("Entry0", CalculationMode.Ticks, 5);
    SetProfitTarget("Entry1", CalculationMode.Ticks, 10);
    SetProfitTarget("Entry2", CalculationMode.Ticks, 20);
    Please let me know if I can assist further.

    Comment


      #3
      Perfect ... thank you!

      Comment


        #4
        to correlate with the above recommendation, i set up 3 "SetStopLoss" commands as follows:

        SetStopLoss("Entry0",CalculationMode.Ticks, stopInTicks);
        SetStopLoss("Entry1",CalculationMode.Ticks, stopInTicks);
        SetStopLoss("Entry2",CalculationMode.Ticks, stopInTicks);


        But I get this compiler msg: " overload for method 'SetStopLoss' takes 3 arguments" ... any thoughts? thanks

        Comment


          #5
          Hello pman777,

          Thanks for the reply.

          You must use this overload to specify a signal name for SetStopLoss:

          SetStopLoss(string fromEntrySignal, CalculationMode mode, double value, bool isSimulatedStop)

          Pass in "false" for isSimulatedStop if you do not want a simulated stop.

          Please let me know if I can assist further.

          Comment


            #6
            thank you!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            53 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            32 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            195 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            357 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            277 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X