RelativeTakeProfitLastProtection
record cAlgo.API Since 5.8
DesktopCLICloud
Represents the final take profit in a relative take profit ladder, closing the remaining order volume at a distance (in pips) from the entry price.
Definition
public class RelativeTakeProfitLastProtection
Namespace: cAlgo.API · Group: Trading
Examples
var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitLastProtection(40));
var result = ExecuteMarketOrder(TradeType.Sell, SymbolName, 10000, "myLabel", new RelativeStopLossProtection(20), takeProfits);
if (result.IsSuccessful)
Print("Take profit price: {0}", result.Position.TakeProfit);
takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitLastProtection(40))
result = api.ExecuteMarketOrder(TradeType.Sell, api.SymbolName, 10000, "myLabel", RelativeStopLossProtection(20), takeProfits)
if result.IsSuccessful:
api.Print(f"Take profit price: {result.Position.TakeProfit}")
Constructors
| Name | Description |
|---|---|
| RelativeTakeProfitLastProtection 2 overloadsDesktopCLICloud | Represents the final take profit in a relative take profit ladder, closing the remaining order volume at a distance (in pips) from the entry price. |
Properties
| Name | Description |
|---|---|
DistanceDesktopCLIClouddouble | The take profit distance, in pips, from the order's entry price. |