Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to set trailing stop after trade is in the black

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

    How to set trailing stop after trade is in the black

    Can anyone show me how to place a trailing stop after a trade is profitable. Basically I want to place a 4 tick trailing stop as soon as a trade is 4 ticks in the profit. Thanks

    #2
    Originally posted by relogical View Post
    Can anyone show me how to place a trailing stop after a trade is profitable. Basically I want to place a 4 tick trailing stop as soon as a trade is 4 ticks in the profit. Thanks
    Are you using the ATM?

    Comment


      #3
      Originally posted by sledge View Post
      Are you using the ATM?
      No ATM, just trying to code a simple automated strat.

      Comment


        #4
        Originally posted by relogical View Post
        No ATM, just trying to code a simple automated strat.
        SetTrailStop??



        Comment


          #5
          Thanks but that's not what I need. I need to set the trailing stop after a trade is profitable. I do not want to set it as a stop that trails. I want it to set as a profit that trails.

          Comment


            #6
            Originally posted by relogical View Post
            Thanks but that's not what I need. I need to set the trailing stop after a trade is profitable. I do not want to set it as a stop that trails. I want it to set as a profit that trails.
            So add a conditional that if the current price > entry price, then SetTrailStop...

            Maybe you post some code of what you have? It will be probably be easier to fix that up.

            Comment


              #7
              That's the thing, I am not a programmer so I'd like to see a code example.

              Comment


                #8
                Originally posted by relogical View Post
                That's the thing, I am not a programmer so I'd like to see a code example.
                Hopefully someone has something coded up for this, as I do not.

                Comment


                  #9
                  Have you looked into this example here relogical?



                  This would set an initial static stop with SetStopLoss and then adjust to breakeven once a profit has been reached. This could be of course further customized.

                  Comment


                    #10
                    I do not want to set a stop. I want to set a trailing stop once my trade becomes profitable. Any code examples? Thanks

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by charlesugo_1, 05-26-2026, 05:03 PM
                    0 responses
                    52 views
                    0 likes
                    Last Post charlesugo_1  
                    Started by DannyP96, 05-18-2026, 02:38 PM
                    1 response
                    142 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by CarlTrading, 05-11-2026, 05:56 AM
                    0 responses
                    160 views
                    0 likes
                    Last Post CarlTrading  
                    Started by CarlTrading, 05-10-2026, 08:12 PM
                    0 responses
                    96 views
                    0 likes
                    Last Post CarlTrading  
                    Started by Hwop38, 05-04-2026, 07:02 PM
                    0 responses
                    276 views
                    0 likes
                    Last Post Hwop38
                    by Hwop38
                     
                    Working...
                    X