Using Trailing stop in cTrader 3.0
Using Trailing stop in cTrader 3.0
08 Jul 2018, 09:38
Hi there,
In PlaceStopOrder and PlaceLimitOrder, there is "hasTrailingStop". I believe if it was "true", the order will have trailing stop.
However, I can't find any document how to use it. So how can I set trailing stop to be triggerred when trade profit 20 pips, and having trailing stop distance 10 pips?
Thanks in advance
Noppanon
Replies
trader.andyng
18 Apr 2019, 19:00
RE:
Andrey Pisarev said:
Hi Noppanon,
Distance for Trailing Stop is taken from the distance from Stop Loss to current price when Trailing Stop is applied.
You can't specify when Trailing Stop will start working. It can be done from the the code. Here is an example:
double TrailingStopPips = 20; if (position.Pips >= 10 && position.HasTrailingStop == false) { var newStopLoss = position.TradeType == TradeType.Buy ? Symbol.Bid - Symbol.PipSize * TrailingStopPips : Symbol.Ask + Symbol.PipSize * TrailingStopPips; ModifyPosition(position, newStopLoss, position.TakeProfit, true); }
Regards,
Andrey
Hi cTrader team,
I totally new and fresh to read about coding word as you explained.
Can you please teach me step by step how can I apply or setting trailing stop as distance by thru coding?
Besides this, shall I keep turn on cTrader flatform to avoid trailing stop invalid? Or, it is okay once my trailing stop set and I can shut down my computer?
If we need to code distance trailing stop, what is the function to check the small box of "Trailing stop" inside the PlaceLimitOrder window?
Please teach me, I need auto distance trailing stop while I am not infront of my computer..
Thank you
@trader.andyng
milesimatias
28 Jun 2019, 15:58
RE:
hola, pueden incorporar, que el trailing stop...se inicie a partir de cierta cantidad de pip,
por ejemplo en mt4 se puede poner, que el trailing se inicie al llegar a 10 pip en positivo por ejemplo, con una distancia de 5 pip, o poniendo un SL, y un TP asegurado, pero esto inicia a partir de cierta cantidad de pip, no antes. automaticamento, no hay necesidad de estar esperando para activar el trailing stop..
gracias
macacoxp@hotmail.com es mi correo por si no entienden mi sugerencia
@milesimatias
ap11
09 Jul 2018, 14:31
Hi Noppanon,
Distance for Trailing Stop is taken from the distance from Stop Loss to current price when Trailing Stop is applied.
You can't specify when Trailing Stop will start working. It can be done from the the code. Here is an example:
Regards,
Andrey
@ap11