Code to exit position after 30 bars if long still in profit

Forums ProRealTime English forum ProBuilder support Code to exit position after 30 bars if long still in profit

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

    Hi guys

    Please can someone help with this bit of coding I’ve used something similar for breakeven but wanted to try something that would exit long position if the price started to retrace after so many bars but whilst still being in profit.

    Thanks in advance.

     

    #234645

    Hi!
    with this code you can control the number of bars inside the trade:

    If you want also be in profit>0 you can add this:

    1 user thanked author for this post.
    #234650

    Thank you Ivan. 🙂

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