Using ATR as SL or TP

Forums ProRealTime English forum ProOrder support Using ATR as SL or TP

Viewing 5 posts - 1 through 5 (of 5 total)
  • #8589

    I would like to use the Average True Range (ATR) value as an exit criteria to my strategy.

    I would like to test the following possibilities. Any help would be much appreciated.

    1. Take profits if pips = ATR
    2. Take profit if pips = ATR/2
    3. Stop loss if pips = ATR
    4. Stop loss if pips = ATR/2
    5. Trailing stop if pips = ATR
    6. Trailing stop if pips = ATR/2
    #8592

    Please find below a code snippet to code that:

     

     

    #8598

    Thank you for your prompt advice Nicolas.

    I will give it a try 😉

    #8608

    Would this be a problem if the ATR value is not a whole number? i.e. if ATR = 11.3 , would the SL or TP be set at 11 i.e. the nearest whole number?

    Or would it be rejected as 11.3 is not a valid pip value?

     

    Regards

    Kiran

    #8609

    It’s not a problem since SET STOP LOSS and SET TARGET PROFIT need “price” value, not point one (these are different instructions : PLOSS and PPROFIT).

    e.g.:

     

     

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