Another try at a trailing stop

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

Currently, there are 0 users and 1 guest visiting this topic.
View all attachments
Viewing 5 posts - 1 through 5 (of 5 total)
  • #195831 Report

    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.

     

     

    #195881 Report

    Try this one:

    #195901 Report

    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.

     

    #195942 Report

    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.

     

    #196350 Report

    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.

    Cheers

    Steve

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