I bet this has been up a thousand times, but I can’t find anything when searching the forum, so I apologize for – probably – repeating the question.
In a long position i EUR/USD, I’d like to set a TSL when profit is more than PSL. I’d like the TSL start 1 pip above the entry price. Let’s say that PSL is 20 pips, then I’d like a TSL of 19 pips. I realize there’s a difference if I use high[1] or close[1] and that in reality the TSL will be based on the difference between entry + 1 pip and the close of the previous candle.
Am I totally lost for thinking this code should work?
So what happends if I use a 20 pip trailing stop from entry, but the price is, say, 100 pip in profit? Isn’t that a 120 pip trailing stop then? As opposed to if the trade is 10 pip in profit, and the trailing stop would be only 30 pips?
Can you tell me how to put a trailing stop from break even when I’m in profit?
To be clear, if you code “SET STOPpTRAILING 20″, the stoploss will move of 20 points each time the price has moved favorably of the same amount of points. That’s how it operates with IG / PRT-CFD with each individual order.
There are many trailing stop & breakeven codes snippets in the blog and in the library already, I think you’ll find them easily 🙂
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue