SAR Trailing stop

Viewing 4 posts - 1 through 4 (of 4 total)
  • #4485
    Bob

    I would find useful to have a trailing stop that will stay below the SAR indicator when buying and vice versa when selling. The same coding I guess would apply if using a Moving average or other indicator.

    I used the below code that gives excellent result in back-testing but it appears is a sort of curve fitting as it does not work in real market.

     

     

    #4499

    Hello Bob, pTRAILING is a pip/point distance between the STOP and the current price. So you have to find this distance by substracting the SAR value and the price one.

    #4546
    Bob

    Thanks Nicolas. Pity because it would have been nice to have a sort of dynamic trailing stop.

    Do you know why when trading through IG with your platform it is not possible to have a stop loss and a trailing stop at the same time?

    Example:

    SET STOP LOSS 20 pTRAILING 10

    Thanks

    #4548

    The example i shown to you is a dynamic trailing stop. It’s actually the same to have a fixed price or a price difference between 2 points.

    Just to be clear :

     

    or you can also change dynamically your stoploss at each new bar :

     

    Of course I made no conditional request to the server to test if the SAR is above or below your price, it will handle by itself if it can place the stoploss for a buy or a sell order.

    1 user thanked author for this post.
    avatar von
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