Page 1 of 1

Need help with Stop loss

Posted: Tue Jan 12, 2021 11:50 am
by Bellored
Hi my name is Michael and I am trying to backtest a new Forex Strategy.
I am currently stuck with my Strat on the hour chart on the GBP/JPY pair.
I have a fixed Stop loss at 1.5 Atr after entry.
When my first Take profit target at 1.5 Atr is hit, it should set my Stop loss to breakeven and activate my trailing Stop loss.
For my Trailing Stop loss it looks back 7 candles and stops when the highest/lowest (long/short) close is 2 atr apart from the current price.
My take profit target is detected by comparing my strategy.position_size with my entry position size.

I can show you my full script if needed.
I would aprreciate your help and if you want to contact me directly, you can send me an email to: tonkich.michael@gmail.com
Greetings Germany

Re: Need help with Stop loss

Posted: Fri Jan 15, 2021 1:21 am
by Matthew
Hi Bellored! Unfortunately I don't have time to help with your script but maybe someone else here will be able to.

Over on my website I have a new course coming soon that breaks down all of my existing scripts & indicators which includes a strategy script that uses break-even & trailing stops which you could reference.

Otherwise if you don't want to sign up for that then I wish you the best of luck with your script my friend! Let us know how you go :)