RelativeTakeProfitProtections.SecondTakeProfit
property · RelativeTakeProfitProtections · cAlgo.API Since 5.8
DesktopCLICloud
Gets the second partial take profit, if any.
Definition
public RelativeTakeProfitProtection SecondTakeProfit {get;}
relativeTakeProfitProtections.SecondTakeProfit: RelativeTakeProfitProtection
Returns RelativeTakeProfitProtection
Examples
var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(10000, 20), new RelativeTakeProfitProtection(10000, 30), new RelativeTakeProfitLastProtection(45));
if (takeProfits.SecondTakeProfit != null)
Print("Second take profit at {0} pips", takeProfits.SecondTakeProfit.Distance);
takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitProtection(10000, 20), RelativeTakeProfitProtection(10000, 30), RelativeTakeProfitLastProtection(45))
if takeProfits.SecondTakeProfit is not None:
api.Print(f"Second take profit at {takeProfits.SecondTakeProfit.Distance} pips")