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 has 7 replies, 4 voices, and was last updated 5 years ago by Nicolas.
Tagged: trailing stop
-
-
12/06/2018 at 1:24 PM #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.
12/06/2018 at 1:39 PM #86436To replicate your system we need:
- complete code
- TF used
12/06/2018 at 2:20 PM #8643812/06/2018 at 2:29 PM #8643912/06/2018 at 2:53 PM #86441then 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.
12/06/2018 at 3:21 PM #8644312/06/2018 at 3:58 PM #8644512/06/2018 at 4:19 PM #86448What 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:
1SET STOP pTRAILING max(5,close[1]/200)For trailing stop functionnalities, you should use coded versions that exist around in the forums.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on