How To use Trailing function and own coded SL

Forums ProRealTime English forum ProOrder support How To use Trailing function and own coded SL

Viewing 4 posts - 1 through 4 (of 4 total)
  • #162773
    Im looking for a combined function of STOP LOSS x and TRAILING y
    As I understand you can use that combo in Backtest but not in Auto Trading.
    I’ve read around in the forum and found several ways to “hard code”/own script code the TRAILING function and for ex. combine it with the STOP LOSS x command line.
    Im looking for the reversal.
    To use the SET STOP TRAILING and then set a coded SL
    Example
    What code could I use?
    Would like the SL to be X points bellow tradeprice
    (trading index)
    The basic Ide, as you probably understand, is too safe up the trade; so if after enter the trade goes down bellow SL sell. If that dosnt happends use TRAILING and follow the trade in favor direction (to exit after turnaround)
    #162774

    Replace line 15 with:

     

    #162775

    Thanks for the reply.

    But using that line 15 will “overwrite” line 11 making line 11 obsolete.

    Im looking for a code to add on line 15 for a SL to run together with TRAILING

    #162791

    After replacing line 15, replace also line 11 with lines 17 through 56 of the code snippet at https://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/.
    that will act as a trailing stop.

     

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

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