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 SalmaTrader, 07-07-2026, 10:26 PM
                    0 responses
                    49 views
                    0 likes
                    Last Post SalmaTrader  
                    Started by CarlTrading, 07-05-2026, 01:16 PM
                    0 responses
                    22 views
                    0 likes
                    Last Post CarlTrading  
                    Started by CaptainJack, 06-17-2026, 10:32 AM
                    0 responses
                    15 views
                    0 likes
                    Last Post CaptainJack  
                    Started by kinfxhk, 06-17-2026, 04:15 AM
                    0 responses
                    21 views
                    0 likes
                    Last Post kinfxhk
                    by kinfxhk
                     
                    Started by kinfxhk, 06-17-2026, 04:06 AM
                    0 responses
                    23 views
                    0 likes
                    Last Post kinfxhk
                    by kinfxhk
                     
                    Working...
                    X