How to place both a trailing stop loss and non-trailing stop loss?

Created at 01 Apr 2019, 07:57
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
FI

firemyst

Joined 26.03.2019

How to place both a trailing stop loss and non-trailing stop loss?
01 Apr 2019, 07:57


Hey everyone:

What I would like to be able to do is the following:

1) when a price hits $5, ExecuteMarketOrder with a trailingstoploss @ $2. 

2) I would also like to place a normal "stop loss" order at $3.50, so if the price dips below it before the TSL has a chance to move upwards, I'll close off my position.

How do I do this?

Would I have to first place an ExecuteMarketOrder with a "trailing stop loss":

ExecuteMarketOrder(TradeType.Buy, Symbol, PositionSize, MyLabel, SuperProfitStopLossInPips, null, null, null, true);

, and then do a "PlaceStopOrder" (Is it "TradeType.Buy" or "Sell"? I'm also not sure about the "target price" and "stop loss" in this api call) :

PlaceStopOrder(TradeType.Buy, Symbol, PositionSize, 3.50, MyStopLimitOrder, 0, null);

????

 

 

3) Now if the price moves up from $5 -> $6, I want to continue to leave the TSL alone, but modify the fixed price stop-loss from $3.50 -> $4, would I have to do it as follows:

ModifyPendingOrder(order, 4, (4 - 3.5) / PipSize, null);

?

 

Thank you.


@firemyst