moving sell or buy stop (not trailing stop)

Forums ProRealTime English forum ProOrder support moving sell or buy stop (not trailing stop)

Viewing 7 posts - 1 through 7 (of 7 total)
  • #153589

    Hi, Would appreciate anyone that can help on this.

    So I have the following buy code,

    LongEntry is the event with lime green background color and the first one is my buy position with a 9.1 pips stop loss.  As you can see, there will be multiple events of LongEntry, and each one there’s a corresponding “LongSL” drawn with a segment and pips measure (i.e. 4.8, 4.4 and 4.8.

    What I want to do is to either to get the lowest LongSL in this case, 4.4pips (longSL can also be calculated as a price) OR get the latest LongSL – the 4.8pips or 104.066 – as my exit signal.  I cannot use a trailing stop loss because I work with guaranteed sto loss which are normally farther than my LongSL price.  Is there a possible solution to this?  Im thinking of a counter of the event so I can get the latest one but I dont know how to do it.

    thanks for anyone who find time to reply.

    #153593

    To get the lowest longSL you can write:

    but I an not sure that’s what you want.

    A text example would be of greater help.

     

     

    #153626

    LongSL is calculated as

    There will be multiple events of LongEntry like in this scenario, 4 times (see picture).  The first one is my buy entry and with first LongSL asssigned as my stoploss.

    Now, what I want is to get the min of the suceeding LongSL (in pips) or PriceSL (price) to be exit scenario i.e 104.066

     

    The other option is to get the latest PriceSL as my exit point.

     

    #153627

    To get the lowest among LongSL and PriceSL:

    but as you have combined that calculation with a logical operator, you will instead get either 0 or 1.

    Moreover,  at line 4 you did not use PIPSIZE (that you used at line 1)  thus probably making my line of code fail in some cases.

    If you want to be helped you need to post your code or be accurate when posting details, otherwise we can only guess.

     

     

     

    #153629

    Apology if I provide confusion for adding the PriceSL, it is not on my original code but added since I realized that the new exit cannot be based on pips but price

     

    so from the above, what I am trying to find is to have another exit point (MovingSL).  I will exit my position if the Price crossess under movingSL

    I intended to have the MovingSL as either:

    1. the highest (correction from my initial post) of the previous PriceSL that happne
    2. OR the latest one PriceSL recorded.

    From the attahcment you can see, 4 events of the PriceSL.  The first one is my entry point (LongEntry).

    In both option since highest is also the latest PriceSL on this picture, exit pooint should be earlier at 104.066 and not on 104.041 which is the set stop loss.

    #153907

    Hi Roberto, Do you know of possible solution for this.  I provide more details.

    Thanks in advance.

    #153920

    theo123 – Topic moved to ProOrder forum as it is a strategy topic and not an indicator topic. Please try to post in the correct forum with any future topics.

    _ ProRealTime Platform Support: only platform related issues.
    _ ProOrder: only strategy topics.
    _ ProBuilder: only indicator topics.
    _ ProScreener: only screener topics
    _ General Discussion: any other topics.
    _ Welcome New Members: for new forum members to introduce themselves.

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