Trailing stop function to take profit during retracement

Forums ProRealTime English forum ProOrder support Trailing stop function to take profit during retracement

Viewing 3 posts - 1 through 3 (of 3 total)
  • #138818

    Firstly, I would like to thank everyone for creating such an amazing community.
    I need a little coding help with the trailing stop algo –

    Scenario: Buy Long

    Preconditions:

    • BUY long 1 contract
    • Using the Trailing STOP function from snippet library
    • TrailingStart set to 200 pips
    • Trailing Step set to 15 pips

    During trade:

    • Profit reaches 175 pips
    • Starts to retrace to 100 pips

    I want to:

    • Take profit @ 100 pips
    • Open another BUY long trade immediately.

     

    Similiar flow for short SELL

    Is it a profitable approach?

    If yes, can you help me code this or direct me to relevant documentation?

     

    Thanks in advance.

    #145492

    This should do, but couldn’t test it, nor check syntax errors, if any:

     

    5 users thanked author for this post.
    #145507

    Thanks @robertogozzi, will test it and let you know how it goes.
    Cheers.

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

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