Topics
Replies
polepole
11 Mar 2024, 20:48
( Updated at: 12 Mar 2024, 06:06 )
RE: Trailing SL distance
Thank you for your reply, it is almost clear now. Although it is strange that you do not have a parameter where you can specify the trailing distance when you activate the trailing SL.
Let me see if I understood corectly:
- I have a BUY opened at price P
- Price has risen at P+60pips and now I set a SL at P+15pips
Question 3: If I enable trialing SL, the SL will now trail at 45 pips below current price? Alternatively, if I enable trailing SL and there is no SL, it will trail at 60 pips?
Then:
- Price has now reached P+100 and SL is at P+55 (because it's trailing 45 pips)
- I move the SL to P+30pips
Question 4: Will this change the trailing distance to 70 pips?
Question 5: If I move the SL at P+70pips, will this change the trailing distance to 30 pips?
Thank you!
firemyst said:
Question 1: the SL should trail at the distance it is the moment the ModifyTrailingStop is executed on the server. Note that because of rapid market movements this could change between when the bot executes the command to when the server actually receives and implements it.
Question 2: you position.ModifyTrailingStop(false) and i) either way for the price to move to the distance you want, or ii) move the SL yourself to the desired distance. Then you can re-enable the trailing stop.
Or another way is while trailing stop is true, you move the trailing stop either forward/backward to the distance you want by doing position.ModifyStopLossPrice or position.ModifyStopLossPips
@polepole
polepole
25 Mar 2024, 21:38
[SOLVED]
The correct code is
buyBundle = buyBundle.Append(to_add).ToArray();
@polepole