Trailing stop loss advice

Forums ProRealTime English forum ProOrder support Trailing stop loss advice

  • This topic has 6 replies, 2 voices, and was last updated 8 months ago by avatarSVK.
Currently, there are 0 users and 1 guest visiting this topic.
View all attachments
Viewing 7 posts - 1 through 7 (of 7 total)
  • #184925 Report
    SVK

    Hi all,

    I would really appreciate if any of you experienced people can point me in the right direction of Trailing stop loss.
    I’m aware of the Snippet Link Library and I have now tested several of them and it must be me but none of them are doing what I’m looking for.
    Maybe some of them do and I’m just far too stupid (spent 6 hours yesterday and 4 hours today and frustration is getting better of me).

    Can you please point me to Trailing stop loss which does following ?

    Example:
    1; Stop Loss = 20 points

    2; Trailing starts after price moves 5 points in my favor

    3; Trailing step is 5 points

     

    So every 5 points in my favor stop moves up by 5 points (simple mechanical thing).

    Stop Loss

    Trailing start

    Trailing step

    Vonas has done something close to that but there is not trailing step (if his startegy didn’t have minimum stop distance it would does what I’m after).

    sl = 144 //Stop loss distance
    slmove = 5 //Price move needed to move stop
    minstop = 10 //Minimum stop distance allowed

    Thank you very much

    #184927 Report

    Lines 17-56 of this snippet by Nicolas is doing exactly what you are looking for https://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/.

    Just Copy & Paste those lines at the end of your code and replace 20 with 5 in trailingstart (trailingstep is already set as 5).

     

    1 user thanked author for this post.
    avatar SVK
    #184937 Report
    SVK

    Hi Roberto,

    thank you very much for your response.
    I’m using Nicolas’s trailing stop with your modification.

    1; Nicolas’s trailing stop was stopping strategy 100% of the time as soon as profit reached Trailingstart

    2; I have searched for hours and found your post I think in German language where you have Distance = 4 * pipsize. This has helped massively as the strategy stopped quitting after each succesfull trade.

    3; Trailing stop never trails. 100% of profitable trades exit at the point of reaching trailingstart.
    DAX settings

    Trailing start = 30 points

    Trailing step = 6 points (tested with, 7, 8, 9, 10, 11 makes zero difference)

     

    I have observed behavior of this trailing stop:

    1; Trailing start reached (30 points)

    2; it correctly moves stop loss to break even point

    3; immediatelly it moves stop to the next step 6 points

    4; another 6 points and another until it reaches 30 points and then it sells at that point (100% trades exited at 30 point)

     

    What I’m after:

    Stop loss = -20 points

    Step size = 5 points

    Trailing start = 30

    30 points move up = New stop loss -15

    Another 30 points up = New stop loss -10

     

    Thank you very much for your help

     

    #184952 Report

    I’ll code it asap.

     

    1 user thanked author for this post.
    avatar SVK
    #184953 Report
    SVK

    Roberto,

    you are a gentleman.

    Thank you very much for your help

     

    #185053 Report

    Try this one:

    1 user thanked author for this post.
    avatar SVK
    #185221 Report
    SVK

    Roberto,

    thank you very much for your help.
    I will try it tomorrow and will report back.

     

    Would have never manage to code something like this.

     

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

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