Hi, I have got code for my trading strategy however currently my trailing stops come into effect as soon as I am long or short. I want my code so that the trailing stops only come into effect when I am in guaranteed profit. for example if I am long and my trailing stop is 10 points I want my trailing stop to come into effect why my position is up 10 points, so that I break even as a minimum. Does anyone know how to do this and is willing to help?
For the trailing stop it is advisable to use the code from lines 17 to 56 at this linkhttps://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/