I’m very new to PRT and coding but decided to try my hand at writing a simple trailing stop. I’d be thrilled if anyone could take a look at what I’ve done and let me know why it’s not working. At this stage, the code enters a position but doesn’t seem to exit where the trailing stop probably should. Any guidance appreciated.
Thanks Roberto, really appreciate your response but that version doesn’t seem to work either. It still won’t exit trades and for some reason your version buys at way over the market rate.
Thanks for your reply, sorry for not getting back to you, I’ve just been trying to learn a bit more about the coding. I might have another go and then come back with more questions in the future.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok