Variable breakeven stoploss code help

Forums ProRealTime English forum ProOrder support Variable breakeven stoploss code help

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

    Hi everyone, I have been trying to get my code right for bringing my stoploss to breakeven, but it seems to be doing all sorts of weird stuff.

    I was wondering if someone could double check my code and maybe correct it for me.

    I use the ATR to give me values for my stop loss and breakeven level.

    The first stoploss is set at 1.5 x the ATR.
    Once the price moves in my favour by 1.0 x the ATR I want to move my stop to breakeven, but I want to use the original ATR  value that was used when I entered the trade.

    Ignore the indicator that I use, that was just there for the test.

    Really appreciate any help! Thanks!

     

     

    #139923

    I have just noticed that i forgot to add

    SIGNAL = 0

    at the top of the code in my variables section and that line 101 needed a “<=”.
    Other than that can anyone spot any problems with this code?

    Thankyou

    #139930

    Move lines 27-28 to just after BUY at line 64 and SELLSHORT at line 75.

     

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