PendingOrder.TakeProfit
property · PendingOrder · cAlgo.API
DesktopCLICloud
The order take profit in price
Definition
double? TakeProfit {get;}
pendingOrder.TakeProfit: float | None
Returns double?
Examples
var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, "myLabel", 20, 40, ProtectionType.Relative);
if (result.IsSuccessful)
Print("Order take profit price: {0}", result.PendingOrder.TakeProfit);
result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, "myLabel", 20, 40, ProtectionType.Relative)
if result.IsSuccessful:
api.Print(f"Order take profit price: {result.PendingOrder.TakeProfit}")