Topics
25 Mar 2024, 17:21
 159
 1
09 Mar 2024, 12:15
 237
 3
Replies

polepole
25 Mar 2024, 21:38

[SOLVED]

The correct code is

buyBundle = buyBundle.Append(to_add).ToArray();


@polepole

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:

  1. I have a BUY opened at price P
  2. 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:

  1. Price has now reached P+100 and SL is at P+55 (because it's trailing 45 pips)
  2. 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