Trailing stop not working as expected, then suddenly starts to work

Forums ProRealTime English forum ProOrder support Trailing stop not working as expected, then suddenly starts to work

This topic contains 7 replies, has 4 voices, and was last updated by avatar Nicolas 5 months, 1 week ago.

View all attachments


Viewing 8 posts - 1 through 8 (of 8 total)
  • #86432

    So the trailing stop did not move for several hours from what i can see and then it suddenly jumped. Anyone know what the problem can be?

    All the error messages on the rejected orders read “Position already has an on-going stop”

    09:00:01 algo1 went short

    09:00:02 algo2 went short

    09:30:01 algo3 went long

    10:35:59 algo3 was stopped out

    10:55:31 algo1 took profit

    11:20:00- ish algo 2 should have taken profit

    12:45:00 trailing stop for algo2 starts working again

    13:20:39 algo 2 takes profit

    Guessing it could have something to do with algos working in different directions with ongoing positions.



    To replicate your system we need:

    • complete code
    • TF used



    Topic moved into ProOrder section.

    Is your account a limited risk one?


    im running these algos on a demo account.



    then it suddenly jumped.

    Trailing Stops (TS) can do this depending on the type / setting of the TS.  You don’t say what type of TS you are using or better still provide the code so we all have to guess! 🙂

    TS can have a threshold value and  then a step value  … for example a 30 point threshold before the TS moves the  5 points step.

    Hope that makes sense?

    1 user thanked author for this post.

    I see many rejected orders in the list, what kind of trailing stop do you use? a SET STOP PTRAILING?

    1 user thanked author for this post.



    Algo 2 is the one that failed



    What happen if the Close[1] value is very tight? You should not use SET STOP PTRAILING with this kind of calculation. Be aware that SET STOP PTRAILING performs not the same way in backtests than on real/demo accounts because of the minimal stop distance defined by the broker for the step value (it usually makes the backtests much better than in real life).

    Anyway, the main problem here is that the value you set is not respecting this behavior and therefore the trailing stoploss is rejected.

    For example, if the DAX minimal stop distance is 5 points, you could modify the code like this:


    For trailing stop functionnalities, you should use coded versions that exist around in the forums.

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

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