Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

move SL and TP into a semi automatic strategy

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

    move SL and TP into a semi automatic strategy

    Hi
    I created a semiautomatic strategy,
    I decide when strategy should go long or short, using 2 buttons to activate them.
    SL and TP are set into setting.

    but, now I noted that when order entry, I cannot move SL and TP into chart, they both go back to original place.

    how to fix this?

    #2
    I use these in my code

    SetProfitTarget(CalculationMode.Ticks, PTOffset);


    SetStopLoss(CalculationMode.Ticks, SLOffset);​

    Comment


      #3
      Hello hellboy78,

      Are you asking about manually moving the targets?

      Comment


        #4
        yes, manually move the target and also stoploss, when trade is placed by the strategy.

        Comment


          #5
          Hello hellboy78,

          When a strategy places those orders it controls them. If your logic is calling those orders to update them it will continue to override any manual changes you make. If you are using something like a trail stop that will be amended for each bar overriding any manual changes.

          Comment


            #6
            yes, infact I'm asking how to update the code.
            I saw
            Syntax
            ExitLongStopMarket​
            ExitLongLimit​
            ExitShortStopMarket​
            EnterShortLimit​

            Comment


              #7
              Hello hellboy78,

              I am not sure what you are asking here, any order your strategy controls will override your manual changes if its controlling it.

              Comment


                #8
                I saw the thread from another user



                looks like : NinjaTrader_BrandonH​ was able to suggest a way to change that behaviour

                Comment


                  #9
                  Hello hellboy78,

                  Yes you can use that sample from that post to what that post explains. The strategy is not controlling the orders because it submits them 1 time and stops controlling them. If your strategy is controlling the orders then any manual changes will be overridden.

                  Comment


                    #10
                    well. I didn't get.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by NullPointStrategies, Yesterday, 05:17 AM
                    0 responses
                    71 views
                    0 likes
                    Last Post NullPointStrategies  
                    Started by argusthome, 03-08-2026, 10:06 AM
                    0 responses
                    143 views
                    0 likes
                    Last Post argusthome  
                    Started by NabilKhattabi, 03-06-2026, 11:18 AM
                    0 responses
                    76 views
                    0 likes
                    Last Post NabilKhattabi  
                    Started by Deep42, 03-06-2026, 12:28 AM
                    0 responses
                    47 views
                    0 likes
                    Last Post Deep42
                    by Deep42
                     
                    Started by TheRealMorford, 03-05-2026, 06:15 PM
                    0 responses
                    51 views
                    0 likes
                    Last Post TheRealMorford  
                    Working...
                    X