Skip to content

RelativeTakeProfitProtections.FirstTakeProfit

property · RelativeTakeProfitProtections · cAlgo.API Since 5.8

DesktopCLICloud

Gets the first partial take profit, if any.

Definition

public RelativeTakeProfitProtection FirstTakeProfit {get;}
relativeTakeProfitProtections.FirstTakeProfit: RelativeTakeProfitProtection

Returns RelativeTakeProfitProtection

Examples

var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(10000, 20), new RelativeTakeProfitLastProtection(40));
Print("First take profit: {0} units at {1} pips", takeProfits.FirstTakeProfit.Volume, takeProfits.FirstTakeProfit.Distance);
takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitProtection(10000, 20), RelativeTakeProfitLastProtection(40))
api.Print(f"First take profit: {takeProfits.FirstTakeProfit.Volume} units at {takeProfits.FirstTakeProfit.Distance} pips")