Another try at a trailing stop

Forums ProRealTime English forum ProOrder support Another try at a trailing stop

Viewing 5 posts - 1 through 5 (of 5 total)
  • #195831

    Hi Everyone,

    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.




    Try this one:


    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.



    Please post:

    • Instrument traded
    • TF used
    • date & time of the bar where an incorrect exit occurred or did not but should have

    so I can specifically check it.



    Hey Roberto,

    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.



Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login