How to change stop loss to break even

Forums ProRealTime English forum ProOrder support How to change stop loss to break even

  • This topic has 4 replies, 2 voices, and was last updated 5 years ago by avatarPere.
Viewing 5 posts - 1 through 5 (of 5 total)
  • #105555

    I put normally a stop loss on my ProOrders. How can I change it’s value to zero after 2 or 3 candles (if I’m doing profit>x)?

    I tried following:

     

    but it goes again to 100 if close<TRADEPRICE on the next candles.

    After switching from 100 to 0 I want to remain it there.

     

    #105559

    Pere – Please use the ‘Insert PRT Code’ button when posting code. i tidied it up for you. 🙂

    #105560

    The problem is that if a trade moves back into a loss then the conditions are not met so the stop loss returns.

    What you have coded is not a break even code but one that removes the stoploss completely. Use the search box to search for ‘BreakEven’ and there are plenty of topics with example code available.

    This should fix your code but perhaps it is not what you actually want:

     

    #105565

    Thank you Vonasi. I was just preparing the question, but just in this moment I had a power outage of one hour, and I don’t know how the question was posted, but it was.

    #105570

    Thank you @Vonasi. Problem is solved with the instructions found on

    https://www.prorealcode.com/blog/learning/breakeven-code-automated-trading-strategy/

     

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