Trailing stops with previous highs and lows

Forums ProRealTime English forum ProOrder support Trailing stops with previous highs and lows

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • #81720

    hello

    I’m looking to code a trailing stop based on previous lows for long positions and previous highs for short positions.

    I tested the following code for long positions which used price as the number of bps from the open;

    I then tried the following, which didn’t seem to work either;

    I’d greatly appreciate any tips or suggestions on how to solve this.

    Best

    Chris

     

     

    #81736

    You should avoid using the trailing stop internal function and prefer a coded one with STOP/LIMIT orders. An example in this blog article: Create stoploss with indicator informations in ProOrder

    For a long order, your moving stoploss could be set like this:

     

    1 user thanked author for this post.
Viewing 2 posts - 1 through 2 (of 2 total)

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