PendingOrder.StopLossBreakEven
property · PendingOrder · cAlgo.API Since 5.8
DesktopCLICloud
The stop loss break even of the order.
Definition
StopLossBreakEven StopLossBreakEven {get;}
pendingOrder.StopLossBreakEven: StopLossBreakEven
Returns StopLossBreakEven
Examples
var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitLastProtection(40));
var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 10000, Symbol.Bid - 20 * Symbol.PipSize, "myLabel", new RelativeStopLossProtection(20), takeProfits, new StopLossBreakEven(15, 2));
if (result.IsSuccessful && result.PendingOrder.StopLossBreakEven != null)
Print("Break-even trigger distance: {0} pips", result.PendingOrder.StopLossBreakEven.TriggerDistance);
takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitLastProtection(40))
result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 10000, api.Symbol.Bid - 20 * api.Symbol.PipSize, "myLabel", RelativeStopLossProtection(20), takeProfits, StopLossBreakEven(15, 2))
if result.IsSuccessful and result.PendingOrder.StopLossBreakEven is not None:
api.Print(f"Break-even trigger distance: {result.PendingOrder.StopLossBreakEven.TriggerDistance} pips")